Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print a single page from a form

Status
Not open for further replies.

etcrier

Programmer
Sep 20, 2006
60
US
I have a form that needs to be printed. The print format is different from the form format
so i need to do a 1 page report.
I want a print button on the form. I could not find any properties for a print button that will sync the form to the report and only print one page of the current form.
any ideas.

thanks

David
 
Hi David

You need to make the record source of the report contain only the record you wish to print either by SQL
or
using the docmd.OpenReport method in the on click proceedure of the button and put
"recordfieldname = therecordyouwanttoprint" as the where criteria (substitute fieldnames and record as appropriate)

You then need a docmd.PrintOut in the on load proceedure of the report.

There are obviously other methods of doing the same thing, I'm just offering you two of them.





Ian Mayor (UK)
Program Error
Programming is 1% coding, 50% error checking and 49% sweat as your application bombs out in front of the client.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top