I want to have a report open and then after the report is open and viewable on the screen have a msgBox come up and say Print? with a yes/no choice so that the user doesnt have to click on the print button! I tried this
Private Sub Report_Open(Cancel As Integer)
Select Case MsgBox("Print?", vbYesNo, "Print?")
Case Is = vbYes
'MsgBox "Yes"
DoCmd.Printout
Case Is = vbNo
'MsgBox "No"
DoCmd.Close
End Select
End Sub
and
Private Sub Report_Page()
Select Case MsgBox("Print?", vbYesNo, "Print?")
Case Is = vbYes
'MsgBox "Yes"
'do nothing
Case Is = vbNo
'MsgBox "No"
DoCmd.Close
End Select
End Sub
to no avail they both have the msgbox open before the report is open!
Private Sub Report_Open(Cancel As Integer)
Select Case MsgBox("Print?", vbYesNo, "Print?")
Case Is = vbYes
'MsgBox "Yes"
DoCmd.Printout
Case Is = vbNo
'MsgBox "No"
DoCmd.Close
End Select
End Sub
and
Private Sub Report_Page()
Select Case MsgBox("Print?", vbYesNo, "Print?")
Case Is = vbYes
'MsgBox "Yes"
'do nothing
Case Is = vbNo
'MsgBox "No"
DoCmd.Close
End Select
End Sub
to no avail they both have the msgbox open before the report is open!