• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

5. Printers > 5.7. Choose an Output Device at Runtime

5.7. Choose an Output Device at Runtime

Problem

You’d like to be able to select an output device while your application is running without popping up the File Page Setup dialog. Is there a way to present a list of available printers and have the chosen report print to the chosen device? For example, you want to print your reports to the printer sometimes and sometimes to the fax machine.

Solution

Though this topic sounds complex, its solution is really just a combination of other solutions in this chapter. The Solution in Recipe 5.2 shows how to retrieve a list of available print devices and retrieve and set the default device. The Solution in Recipe 5.6 shows how to determine if a given report or form is configured to print to the default printer. Given those two techniques, this solution shows you how to set a new output device, print the Access object (using the new default device), and then restore the original default device.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint