print dialog

I

icccapital

Is there any good way to bring up the print dialog one a user defined print
button. I would like to give the user the ability to change the printer to
use for a print job and then run my code for what to print. I am currently
using microsoft commond dialog 6.0 on my form and it works fine in the
development environment, but when I went to install on a user machines I got
"there is no object for this control", which I read is a common dialog
problem.

So is there another way or a solution to this problem that I am missing?
tHanks
 
J

Jim Burke in Novi

If you bring up the report in Print Preview mode, they can choose File,
Print... from the menu bar to change the printer, e.g.

DoCmd.OpenReport "reportName", acPreview
 
I

icccapital

Thank you for the reply, actually the code behind the print loops through a
specific set of clients and prints only their reports so I need the printer
decision to be made once before the print job starts.
 
J

JimBurke via AccessMonster.com

WHoops. Never had to do that. Looks like this wiill show you the printer
dialog:

DoCmd.RunCommand acCmdPrint

But from the examples I saw it looks like you have to show a report in
preview mode, then execute that command. You'll find examples on the web for
this command. This may work, though, as long as it remembers the printer that
was selected. Define a boolean var 'printerSelected', init it to False before
your print loop. Then in your loop, have something like

If printerSelected then
docmd.openreport "rptName", acNormal
else
docmd.Openreport "rptName", acPreview
DoCmd.RunCommand acCmdPrint
printerSelected = true
end if

That's about as good as I can do, since I've never used it. Maybe someone
else here knows more.


Show your first report in preview

Thank you for the reply, actually the code behind the print loops through a
specific set of clients and prints only their reports so I need the printer
decision to be made once before the print job starts.
If you bring up the report in Print Preview mode, they can choose File,
Print... from the menu bar to change the printer, e.g.
[quoted text clipped - 11 lines]
 

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