Computer Learning Zone CLZ Access Excel Word Windows

Whatever the cost of our libraries, the price is cheap compared to that of an ignorant nation.

-Walter Cronkite
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Visitor Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Printer selected based on user
Thomas HUBERT 

2 years ago
Hi,
I created a form where by scanning a barcode, a specific label from a report is automatically printed. By opening the database I also created a form where the user has to choose which mobile scanner/printer they are using. Depending on the selection, I would like the report to print on the correct mobile printer. All printers have been installed on the Print Server. Is there a way to specify in vba the specific printer and paper size to use on the report before printing out ?
Adam Schwanz  @Reply  
           
2 years ago
Application.Printer is what you should look into, something like this

Dim myPrinter As String
myPrinter = "CaseSensitivePrinterName"
Set Application.Printer = Application.Printers(myPrinter)

Alternatively you can look into code to change the default printer to print with and change it back with code after it's printed.

Or you can look into using something like ShellExecute to print something to a specific printer.
Adam Schwanz  @Reply  
           
2 years ago
Missed the part you said based on user, you would also want to use ENVIRON to get the current windows user

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Visitor Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/9/2026 1:09:57 AM. PLT: 0s