A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Filter report to only show current record



 
 
Thread Tools Display Modes
  #1  
Old August 17th, 2007, 03:42 PM posted to microsoft.public.access.reports
robertm600635
external usenet poster
 
Posts: 37
Default 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  
Old August 17th, 2007, 04:00 PM posted to microsoft.public.access.reports
Klatuu
external usenet poster
 
Posts: 7,074
Default 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  
Old August 17th, 2007, 04:26 PM posted to microsoft.public.access.reports
robertm600635
external usenet poster
 
Posts: 37
Default 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  
Old August 17th, 2007, 04:54 PM posted to microsoft.public.access.reports
Klatuu
external usenet poster
 
Posts: 7,074
Default 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  
Old August 17th, 2007, 05:12 PM posted to microsoft.public.access.reports
robertm600635
external usenet poster
 
Posts: 37
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.