Call print dialogue box

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
 
R

RoyVidar

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
 
I

Ian

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
 
I

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top