S
SBGFF
This is my print command to print the report with out previewing it. I want
to modify it so my print screen will come up to pick the proper printer.I
have this simple command,
DoCmd.RunCommand acCmdPrint
If Err = 2501 Then Err.Clear
But don't know how to implement it in this code. I have tried a few things
but get errors
can anyone help
thanks Blair
Private Sub Command_Click()
Dim stDocName As String
If Option66 = True Then
stDocName = "1,9,10-12DayRemates,Scratches"
DoCmd.OpenReport stDocName, acNormal
Text22 = Text22 + 1
If (Text22 >= (Forms![ProgramSetUp]![Text20] + 1)) Then
Text22 = 1
Text20.SetFocus
Text20 = Text20 + 1
End If
Else
stDocName = "1,9,10-12DayRemates"
DoCmd.OpenReport stDocName, acNormal
Text22 = Text22 + 1
If (Text22 >= (Forms![ProgramSetUp]![Text20] + 1)) Then
Text22 = 1
Text20.SetFocus
Text20 = Text20 + 1
End If
End If
Exit_Command50_Click:
Exit Sub
Err_Command50_Click:
MsgBox Err.Description
Resume Exit_Command50_Click
End Sub
to modify it so my print screen will come up to pick the proper printer.I
have this simple command,
DoCmd.RunCommand acCmdPrint
If Err = 2501 Then Err.Clear
But don't know how to implement it in this code. I have tried a few things
but get errors
can anyone help
thanks Blair
Private Sub Command_Click()
Dim stDocName As String
If Option66 = True Then
stDocName = "1,9,10-12DayRemates,Scratches"
DoCmd.OpenReport stDocName, acNormal
Text22 = Text22 + 1
If (Text22 >= (Forms![ProgramSetUp]![Text20] + 1)) Then
Text22 = 1
Text20.SetFocus
Text20 = Text20 + 1
End If
Else
stDocName = "1,9,10-12DayRemates"
DoCmd.OpenReport stDocName, acNormal
Text22 = Text22 + 1
If (Text22 >= (Forms![ProgramSetUp]![Text20] + 1)) Then
Text22 = 1
Text20.SetFocus
Text20 = Text20 + 1
End If
End If
Exit_Command50_Click:
Exit Sub
Err_Command50_Click:
MsgBox Err.Description
Resume Exit_Command50_Click
End Sub