I have made a button on my form to print a report. Now my users must choose first which printer they want to use on our network. How can i change my code so this can be done.
Private Sub KnpFactuurUitvoerder_Click()
Dim stDocName As String
Dim StrlinkCriteria As String
Forms![FrmGegevens].Refresh
stDocName = "RptFactuurDiscobar"
DoCmd.OpenReport stDocName, acPreview, StrlinkCriteria
Exit_KnpFactuurUitvoerder_Click:
Exit Sub
Err_KnpFactuurUitvoerder_Click:
MsgBox Err.Description
Resume Exit_KnpFactuurUitvoerder_Click
End Sub
I know how to open the printscreen with:
DoCmd.RunCommand acCmdPrint
But i don't see how i can put this in my code. When i try this i get a print of the form, not of the report i wanted.
Thanks for helping.
Private Sub KnpFactuurUitvoerder_Click()
Dim stDocName As String
Dim StrlinkCriteria As String
Forms![FrmGegevens].Refresh
stDocName = "RptFactuurDiscobar"
DoCmd.OpenReport stDocName, acPreview, StrlinkCriteria
Exit_KnpFactuurUitvoerder_Click:
Exit Sub
Err_KnpFactuurUitvoerder_Click:
MsgBox Err.Description
Resume Exit_KnpFactuurUitvoerder_Click
End Sub
I know how to open the printscreen with:
DoCmd.RunCommand acCmdPrint
But i don't see how i can put this in my code. When i try this i get a print of the form, not of the report i wanted.
Thanks for helping.