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

5. Printers > 5.1. Retrieve a List of All the Installed Output Devices

5.1. Retrieve a List of All the Installed Output Devices

Problem

You’d like to be able to present your users with a list of all the installed printers. Is there some way to fill a list box with the printer names?

Solution

Access makes it easy to fill a list or combo box with all the available printers. You can iterate through the members of the Application.Printers collection, retrieving the DeviceName and Port of each printer.

To create a list of installed printers, follow these steps:

  1. Add a list box to a form. Set the Name property of the list box to lstPrinters.

  2. Place the following code in the form’s Load event procedure (see the Preface for more information on creating event procedures):


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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