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

Printing A form 1

Status
Not open for further replies.

SpankYou

Programmer
Feb 24, 2003
211
GB
Hey,

Using VBA how can I print everything on an access form? the standard Print command used in vb doesnt work, not messed with vba much.

thanks

Sam
 
this should work...

DoCmd.PrintOut acPrintAll

hope this helps.
 
What if you have a form that has many tabs? Is there an easy way to print what is on those tabs at the same time the main part of the form is printing and the tab that is selected?
 
what if you only want a certain item in the form printed, ie a listbox or chart?
 
What I would suggest is to create a report that is laid out similar to the form. You can actually save a form as a report, to remove many of the steps. Make sure that all of the data is visible from all of the tabs.

Then when they press print you will want to run a statement like:

DoCmd.OpenReport &quot;<Name of Report>&quot;, acViewNormal, , &quot;<Where statement>&quot;

The where statement will be some way to only get at the record that is currently on the screen.
 
Hey cghoga,

Just to say Thanks
I realise I forgot at the time, your code worked great!

Anyway Thank You

Cheers


Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top