Printing a single record from a Form

supportt

Registered User.
Local time
Today, 14:13
Joined
Nov 21, 2001
Messages
70
I am trying to setup a button that would print a single record from a Form view. I have tried several different ways and none seem to work. I have the button setup now to send the single record to a Report and that works, but it is sending all the records in the database, help

Thanks

David
 
Try something like this in your command button:

DoCmd.OpenReport stDocName, acPreview,,"[IDNumber]=" & IDNumber
 
What code did you set up behind your button?
How do the user specify the witch record must be printed (is this the current record?)

Edit: Mugman's code supposes that you want to print the current record, that you have a control (called IDNumber) on your form holding the unique ID (primary key) of that record and that this IDNumber is a numeric field as the name indicates
 
Last edited:
Thank You

That worked like a charm, thanks a million.....

David
 

Users who are viewing this thread

Back
Top Bottom