Call print dialogue box

  • Thread starter Thread starter Ian
  • Start date Start date
I

Ian

Is it possible to have a button on a form which calls up the Windows Print
dialogue box?

We have a database which has a Print button on the input form. It prints 1
copy to the default printer. Normally 3 copies are required, but this could
be any number between 1 and 4. This sin't a big problem as the user can
click the button as many times as required. More of a problem is that a PDF
copy is sometimes required. This currently involves the user changing the
default printer in Windows, then changing it back afterwards. This is a
little too complicated for some of the users.

Any ideas?

Ian
 
Ian said:
Is it possible to have a button on a form which calls up the Windows Print
dialogue box?

We have a database which has a Print button on the input form. It prints 1
copy to the default printer. Normally 3 copies are required, but this could
be any number between 1 and 4. This sin't a big problem as the user can
click the button as many times as required. More of a problem is that a PDF
copy is sometimes required. This currently involves the user changing the
default printer in Windows, then changing it back afterwards. This is a
little too complicated for some of the users.

Any ideas?

Ian

Try

DoCmd.RunCommand acCmdPrint
 
Hi Roy

I assume this needs to go in a VBA module, but I couldn't figure out what
else was needed, but you did point me in the right direction. In the end I
discovered that the macro called by the button had a step calling PrintOut.
I changed this to RunCommand and set the command to Print. This calls the
Print dialogue up.

Thanks for the pointer.

Ian
 
Thanks Pieter. Unfortunately this wouldn't work. 1. because I need the Print
dialogue to be called up on clicking the button (can't rely on users to
remember key combinations, anyway) and 2. one thing I forgot to mention in
my original post is that the Print button doesn't print out what's on
screen. It prints out another form which uses data entered on the input
form.

Thanks for the pointer, though. I didn't know about Ctrl + P. I can think of
a number of situations wherethat will come in handy.

Ian

"Pieter Wijnen"
 
Back
Top