Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: how to open print dialog box


Message #1 by "Peter Duke" <peteydukie@y...> on Fri, 17 May 2002 20:49:19
I have a button on my form that prints the current record.  I'm using 
DoCmd.PrintOut which just prints the form to the default printer. I would 
prefer to have the Print Dialog Box appear.  Does anyone know how to do 
that? It's a popup so I can't do File/Print.
Thanks
Message #2 by "Amy Wyatt" <amyw@c...> on Mon, 20 May 2002 14:00:35
A simple solution is to use the code:
     Application.RunCommand acCmdPrint
This simply brings up the Print Dialog. However, it requires the user to 
choose current record if there are more than 1 records contained in the 
record set of the form. I know that you can change the settings in a 
dialog box or build your own dialog that allows printing but that would 
take quite a bit more code.

Amy

> I have a button on my form that prints the current record.  I'm using 
D> oCmd.PrintOut which just prints the form to the default printer. I 
would 
p> refer to have the Print Dialog Box appear.  Does anyone know how to do 
t> hat? It's a popup so I can't do File/Print.
T> hanks

  Return to Index