Prev: Footer Totals
Next: dcount won't work?
From: BIL on 18 Feb 2010 17:20 I have 1 Cust table and 1 Cust Formular, and 1 Cust report. When I call a report from a formular, and a filter is used, then I want the report only to show records, shown in my formular, and not all the records in the table. How do I do that? Any good eksamples? I have used at buttom in my Cust formular, with a call to my Cust report. If I set nothing in the Where, I get the list of all records in the the Cust table. If I set this i the Where: [cust]![Id1]=[Formularer]![Cust]![Id1] Then I only get that 1 record/post, in focus in the formular. But what I realy whant, is to know, what to write in the Where, if it must include alle shown records/post in my Cust formular. -- Best regards B. I. Lange
From: Daryl S on 19 Feb 2010 11:35 BIL - Set the Where to Me.Filter -- Daryl S "BIL" wrote: > I have 1 Cust table and 1 Cust Formular, and 1 Cust report. > > When I call a report from a formular, and a filter is used, then I want the > report only to show records, shown in my formular, and not all the records in > the table. > > How do I do that? Any good eksamples? > > I have used at buttom in my Cust formular, with a call to my Cust report. > > If I set nothing in the Where, I get the list of all records in the the > Cust table. > > If I set this i the Where: [cust]![Id1]=[Formularer]![Cust]![Id1] > > Then I only get that 1 record/post, in focus in the formular. > > But what I realy whant, is to know, what to write in the Where, if it must > include alle shown records/post in my Cust formular. > > -- > Best regards > B. I. Lange
From: Daryl S on 22 Feb 2010 10:07 BIL - Can you post the code in your button? Also, if you add this: debug.print Me.filter before you open the report, what does it show in the immediate window when you step through the code? -- Daryl S "BIL" wrote: > If I do that, and activates the bottum that call the cust report, > I get a Info boks that promps me for Me.Filter > > I have tried to set the filter line to that expresion as well, > and then I get all the records again. > -- > Best regards > B. I. Lange > > > "Daryl S" skrev: > > > BIL - > > > > Set the Where to Me.Filter > > > > -- > > Daryl S > > > > > > "BIL" wrote: > > > > > I have 1 Cust table and 1 Cust Formular, and 1 Cust report. > > > > > > When I call a report from a formular, and a filter is used, then I want the > > > report only to show records, shown in my formular, and not all the records in > > > the table. > > > > > > How do I do that? Any good eksamples? > > > > > > I have used at buttom in my Cust formular, with a call to my Cust report. > > > > > > If I set nothing in the Where, I get the list of all records in the the > > > Cust table. > > > > > > If I set this i the Where: [cust]![Id1]=[Formularer]![Cust]![Id1] > > > > > > Then I only get that 1 record/post, in focus in the formular. > > > > > > But what I realy whant, is to know, what to write in the Where, if it must > > > include alle shown records/post in my Cust formular. > > > > > > -- > > > Best regards > > > B. I. Lange
From: Daryl S on 24 Feb 2010 10:05 BIL - Sorry, I assumed you had code behind the button, not a macro. The Me.filter would work in a code window, but not in the macro. You can convert form macros to VBA code if you are in design mode on the form. Back up your database first! Then in design mode on the form, go to Tools Macro Convert Form Macros to VBA Code. Then open the code, and where it shows the "Me.Filter", remove the double-quotes, and that should fix the problem. -- Daryl S "BIL" wrote: > Hi Daryl. > > In the formular CUST, bassed on the Table CUST, I have the bottum called > "Cust list". > It is a Integrated makro, with the following: > Handling: Open report > Argument: Cust; Rapport; ; [Me].[Filter]; Ikon > > When I press the bottum, I get the following popup window: > > Header: Type in parameter value > Text: Me.Filter followed by a input field, that is blank. > > I hav a column called Zip, if i makes a mouse right klick in the formular, > on the zip code, and select equals and the zip code of the field, > the formular then only shows cust that have that zip code. > > Then I want the bottum to call the cust report, only showing the same > few cust records that is presented in the formular. > > The hole database is 500Kb included is all, so i can mail it, if it can help. > > -- > Best regards > B. I. Lange > > > "Daryl S" skrev: > > > BIL - > > > > Can you post the code in your button? Also, if you add this: > > > > debug.print Me.filter > > > > before you open the report, what does it show in the immediate window when > > you step through the code? > > > > -- > > Daryl S > > > > > > "BIL" wrote: > > > > > If I do that, and activates the bottum that call the cust report, > > > I get a Info boks that promps me for Me.Filter > > > > > > I have tried to set the filter line to that expresion as well, > > > and then I get all the records again. > > > -- > > > Best regards > > > B. I. Lange > > > > > > > > > "Daryl S" skrev: > > > > > > > BIL - > > > > > > > > Set the Where to Me.Filter > > > > > > > > -- > > > > Daryl S > > > > > > > > > > > > "BIL" wrote: > > > > > > > > > I have 1 Cust table and 1 Cust Formular, and 1 Cust report. > > > > > > > > > > When I call a report from a formular, and a filter is used, then I want the > > > > > report only to show records, shown in my formular, and not all the records in > > > > > the table. > > > > > > > > > > How do I do that? Any good eksamples? > > > > > > > > > > I have used at buttom in my Cust formular, with a call to my Cust report. > > > > > > > > > > If I set nothing in the Where, I get the list of all records in the the > > > > > Cust table. > > > > > > > > > > If I set this i the Where: [cust]![Id1]=[Formularer]![Cust]![Id1] > > > > > > > > > > Then I only get that 1 record/post, in focus in the formular. > > > > > > > > > > But what I realy whant, is to know, what to write in the Where, if it must > > > > > include alle shown records/post in my Cust formular. > > > > > > > > > > -- > > > > > Best regards > > > > > B. I. Lange
|
Pages: 1 Prev: Footer Totals Next: dcount won't work? |