let user select default for each report

Xbox

Registered User.
Local time
Today, 11:52
Joined
Apr 8, 2003
Messages
23
I've been searching and going thru umpteen reference manuals and nothing seems to fit what I need with regard to printing.

With A97 I would like to have a dialogue box give the user the option of selecting the default printer for a specific report.
ie. I have two reports. One prints on the default laser printer and the second prints on some other specialty printer such as a thermal label printer. It has to be through dialogue box and not setting it thru design view. Not much help if I have to give customer access to design view !!

I found something that will allow the user do jsut that but it won't work unless programming with Access2002 !!!!

Any help would be appreciated.
 
open the windows print dialogue box

DoCmd.RunCommand acCmdPrint
 
I can't test this because I only have one printer, which doesn't work at the moment, but you could set each of the Reports to use the default printer and in the Report_Open event add this: -

Shell "Control.exe Printers"

This will display the Control Panel Printer window where they can right click the printer of their choice and set it as the default printer.

It has only been tested with A97 + Win2000

Regards
Chris
 
Thanks bjackson but I already tried that and you need to set that everytime you print.

Thanks ChrisO sounds like a plan. I'll give that a try and let you know.
 
Tried it and not quite what I was looking for.
I need something a bit more "user friendly" so to speak.

The dialogue box will allow the user to set default printer for a given report and have it print on that printer everytime until such time it is changed again.

The key here is "default printer by report". Not a system printer default. I know it's possible for later versions of Access and just hope that someone has this running on Access97.

Thanks for trying guys!
 
I think you might have your work cut out for you.

You may be able to use part of the PrtDevMode structure, there's quite a bit of information in the help file, but if the database is an MDE then all properties are probably read only. If it's an MDB you may be able to, via code, switch to design view, make any changes and switch back to preview mode.

Looks like a lot of work and may be impossible in an MDE.

If it has been done you might find it at Lebans… Here

Good luck

Chris
 
Thanks ChrisO

That's what I thought.
BTW you need not reply to message I posted in VBA Central. I noticed you're the moderator for that group. Good job!;)
 

Users who are viewing this thread

Back
Top Bottom