Link to home
Start Free TrialLog in
Avatar of gsazeides
gsazeides

asked on

Print the current record

  Dear Expert,
I made a form where you view the records from a table. I also made a button at the form footer using the command button wizard to print that record. But when I run it instead of printing the current record(through a Report) it keeps printing all the records sequentially. How can I make that button to print only the record fields I am viewing?
   
               Thanks again
                  George.
Avatar of Helicopter
Helicopter

check the code behind the button. It sounds like you need a where clause in there (e.g. "Where recordID=" & me.recordID)
The fourth argument to DoCmd.OpenReport allows you to specify a WHERE condition. The third argument allows specifying a filter. If you have the form selecting only some records, you obviously already know or can find out how the records are filtered or selected. Just put the appropriate

Ex:
DoCmd.OpenReport "MyReport", acViewNormal, , "(Customer=5) AND (Payment>5.00)"

If you need more specifics, please supply the fields in the form, and how you select the fields to view.
ASKER CERTIFIED SOLUTION
Avatar of sanctified
sanctified

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial