Hey Everyone,
I inherited a database we use to track samples we receive (see attached zip). The main function is to log samples in, and the program prints out two copies of a barcode label. Our IT changed label printer from a local printer to a printserver printer (the name changed as well).
1. I attempt to change the Application.Printers name in this portion of the coding in Form_frmEnterSample:
Code:
Private Sub Form_Load() SampleID.Value = ""
Submission.Value = ""
DoCmd.GoToControl "Submission"
printBatch = 0
Set Application.Printer = Application.Printers("ZebraS4M")
End Sub
2. When I change the printer name in Application.Printers, I receive an error in this portion in the DoCmd... line of the coding Form_frmEnterSample:
Code:
End If
DoCmd.OpenReport "rptLabels", acViewNormal
DoCmd.OpenReport "rptLabels", acViewNormal
End Sub
I believe part of my problem also lies in coding on Report_rptLabels:
Code:
Option Compare Database
Dim prtDefault As Printer
Private Sub Report_Load()
Set Application.Printer = Application.Printers("PA3224-ZebraS4M on PrintServer")
End Sub
Any specific suggestions on where coding should be changed or deleted or modified would be greatly appreciated. I am moderately familiar with Access, but still pretty green with VBA. Greatly appreciated!