I'm trying to print a label from within a form I'm using the following code but some how it doesn't select the right record to print.
Code:
Private Sub cmdLabelPrint_Click()
On Error GoTo error
If MsgBox("Verbind de DYMO 400 printer voordat je door gaat!", vbOKCancel + vbInformation, "DYMO Labels Printen") = vbCancel Then Exit Sub
Set Application.Printer = Application.Printers("DYMO LabelWriter 400")
DoCmd.OpenReport "rptLabels Dymo", acPreview, , "tblOverige.ID= " & Me.ID
Exit Sub
error:
MsgBox "Deze knop werkt alleen met de standaard DYMO LabelWriter 400 printer!", vbOKOnly + vbCritical, "Fout :("
End Sub