Hey all,
The access app I am creating, pulls a .dbf file into a table in access. The name of the printer to be printed to is contained in that file/table.
How would I cycle through the list of printers on my pc until i matched the name in the table and then set the printer to that specific printer..?
I am trying this code and it doesn't seem to work
The access app I am creating, pulls a .dbf file into a table in access. The name of the printer to be printed to is contained in that file/table.
How would I cycle through the list of printers on my pc until i matched the name in the table and then set the printer to that specific printer..?
I am trying this code and it doesn't seem to work
Code:
prntpdf = DLookup("printerpdf", "scarlet") 'Get printer name to print to 'Set printer object to specified printer x = 0 Do While Application.Printers(x).DeviceName = prntpdf x = x + 1 Loop Set Application.Printer = Application.Printers(x)
Comment