How do you Print a report for only a single Client's information?

  • Thread starter Thread starter Bayou BoB
  • Start date Start date
B

Bayou BoB

Goodevening!

If I create a report, how do I ensure that it only prints for a
selected client? At present, the report in place will print all
client's information. I'd like to be able to print only a selected
client report if desired....or a single log entry for that client for
example, as opposed to all client's log entries? I'm sure the answer
is simple, and I thank you very much in advance. I'm still trying to
get the hang of this. It's my first ever project.

Kevin
 
Bayou BoB said:
Goodevening!

If I create a report, how do I ensure that it only prints for a
selected client? At present, the report in place will print all
client's information. I'd like to be able to print only a selected
client report if desired....or a single log entry for that client for
example, as opposed to all client's log entries? I'm sure the answer
is simple, and I thank you very much in advance. I'm still trying to
get the hang of this. It's my first ever project.

Go to the help file and look at the syntax for the DoCmd.OpenReport method.
It has an optional "Where" argument that you can use to specify that the
report be opened with a filter applied. All you have to do is filter on
the Primary Key for the selected client. If this value can be found on the
same form as the button to open the report (typical) then the syntax would
look roughly like...

DoCmd.OpenReport "ReportName",,,"ClientID = " & Me!ClientIDSelection

A proper WHERE argument will be a valid WHERE clause that you would have in
a query, but without the word "where" at the front.
 
Back
Top