If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Filter report to only show current record
I have a report that displays data for payments collected from clients. This
report is grouped by the clients name with their various fees listed below their name. What I need to do is print reports for an indiviual. Each client is assigned a File Number (which I have a field for). I want to filter the report to only show records with a file number that can be entered on an unbound form. any suggestions? |
#2
|
|||
|
|||
Filter report to only show current record
You can use the Where argument of the OpenReport method. See details in VBA
Help. Docmd.OpenReport "ClientPayments", acViewPreview, , "[FileNumber] = " & Me.txtFileNumber Where txtFileNumber is a text box on the form that has the client's file number. -- Dave Hargis, Microsoft Access MVP "robertm600635" wrote: I have a report that displays data for payments collected from clients. This report is grouped by the clients name with their various fees listed below their name. What I need to do is print reports for an indiviual. Each client is assigned a File Number (which I have a field for). I want to filter the report to only show records with a file number that can be entered on an unbound form. any suggestions? |
#3
|
|||
|
|||
Filter report to only show current record
Can't seem to get it to work. Report still shows all clients (all file
numbers). Maybe I should mention that the file number is stored in the main table (along with client name, etc) and that table is related (one to many) to the table which holds the payments/fee data. I have a form that uses the client info table as a record source and a subform that uses the payment/fee table as a record source. The report I'm running uses a query with fields from both tables. "Klatuu" wrote: You can use the Where argument of the OpenReport method. See details in VBA Help. Docmd.OpenReport "ClientPayments", acViewPreview, , "[FileNumber] = " & Me.txtFileNumber Where txtFileNumber is a text box on the form that has the client's file number. -- Dave Hargis, Microsoft Access MVP "robertm600635" wrote: I have a report that displays data for payments collected from clients. This report is grouped by the clients name with their various fees listed below their name. What I need to do is print reports for an indiviual. Each client is assigned a File Number (which I have a field for). I want to filter the report to only show records with a file number that can be entered on an unbound form. any suggestions? |
#4
|
|||
|
|||
Filter report to only show current record
Is FileNumber number or text. If it is text, it needs quotes around it:
"[FileNumber] = '" & Me.txtFileNumber & "'" -- Dave Hargis, Microsoft Access MVP "robertm600635" wrote: Can't seem to get it to work. Report still shows all clients (all file numbers). Maybe I should mention that the file number is stored in the main table (along with client name, etc) and that table is related (one to many) to the table which holds the payments/fee data. I have a form that uses the client info table as a record source and a subform that uses the payment/fee table as a record source. The report I'm running uses a query with fields from both tables. "Klatuu" wrote: You can use the Where argument of the OpenReport method. See details in VBA Help. Docmd.OpenReport "ClientPayments", acViewPreview, , "[FileNumber] = " & Me.txtFileNumber Where txtFileNumber is a text box on the form that has the client's file number. -- Dave Hargis, Microsoft Access MVP "robertm600635" wrote: I have a report that displays data for payments collected from clients. This report is grouped by the clients name with their various fees listed below their name. What I need to do is print reports for an indiviual. Each client is assigned a File Number (which I have a field for). I want to filter the report to only show records with a file number that can be entered on an unbound form. any suggestions? |
#5
|
|||
|
|||
Filter report to only show current record
Works like a charm now, thanks for your quick replies.
"Klatuu" wrote: Is FileNumber number or text. If it is text, it needs quotes around it: "[FileNumber] = '" & Me.txtFileNumber & "'" -- Dave Hargis, Microsoft Access MVP "robertm600635" wrote: Can't seem to get it to work. Report still shows all clients (all file numbers). Maybe I should mention that the file number is stored in the main table (along with client name, etc) and that table is related (one to many) to the table which holds the payments/fee data. I have a form that uses the client info table as a record source and a subform that uses the payment/fee table as a record source. The report I'm running uses a query with fields from both tables. "Klatuu" wrote: You can use the Where argument of the OpenReport method. See details in VBA Help. Docmd.OpenReport "ClientPayments", acViewPreview, , "[FileNumber] = " & Me.txtFileNumber Where txtFileNumber is a text box on the form that has the client's file number. -- Dave Hargis, Microsoft Access MVP "robertm600635" wrote: I have a report that displays data for payments collected from clients. This report is grouped by the clients name with their various fees listed below their name. What I need to do is print reports for an indiviual. Each client is assigned a File Number (which I have a field for). I want to filter the report to only show records with a file number that can be entered on an unbound form. any suggestions? |
Thread Tools | |
Display Modes | |
|
|