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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing current record probelm

Status
Not open for further replies.

fogal

Technical User
Aug 20, 2001
87
0
0
US
I am trying to print the current record in a form. The line of code I am using is below. It works fine but prints 2 pages of the record where as I only want it to print the 1st page. i.e. the 2nd page just contains grey shading because the selection is greater than page width etc..

Hence, I don't want this to print the 2nd page.
Page setup margins have been set on form.

DoCmd.Save
DoCmd.PrintOut acSelection, 1, 1, acHigh, 1, True

Any suggestions??????
 
Hi
Had a similar problem recently and the best answer to this is to create a report that looks just like your form. Create a query that has a parameter against the key field that looks something like [Forms]![MyForm]![MyControl]

Make the query the datasource of your report and off the button that you use to print add:

DoCmd.OpenReport "MyReport", acViewNormal

Your report should print looking just like your form and with the selected record data. If the report is too wide it will complain and you can adjust things to fit. Its the best way I know, good luck.
 
I am trying to print the current form via a button. threrad 705-442428 nearly gives me enough information to do it. Can someone kindly list the steps simply I need to take?

Thanks


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top