Printing one record

Ringers

Registered User.
Local time
Today, 17:09
Joined
Mar 4, 2003
Messages
54
I have created a report using the wizard called service report. I have added a button to my form(MainForm). I want it to print the particular record that i am currently looking at. But when you click the button it prints every record.

I have never done this before so i have no idea how to fix this. Any help would be great. Ta:D
 
Ringers,

Put this in the OnClick event of your command button:

Code:
DoCmd.OpenReport "YourReport",,,"[KeyField] = " & Me.KeyField

You'll have to change the name of your report and your key
field. If your key is a string, surround it with single-quotes.

Wayne
 
Ta got it
 

Users who are viewing this thread

Back
Top Bottom