Greetings all
would you help with the following please
I want to prduce a report on a vb yes no box, I have the first bit, but my report prints on both the yes answer and the no too !
could you fill me in please or is there an easier way than my attempt ?
Private Sub Command81_Click()
On Error GoTo Err_Command81_Click
Dim stDocName As String
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
MsgBox "print receipt", vbYesNo
If vbYes Then
stDocName = "Receipt query"
DoCmd.OpenReport stDocName, acNormal
elseif vbno ?????
Exit_Command81_Click:
Exit Sub
Err_Command81_Click:
MsgBox Err.Description
Resume Exit_Command81_Click
End If
End Sub
many thanks
would you help with the following please
I want to prduce a report on a vb yes no box, I have the first bit, but my report prints on both the yes answer and the no too !
could you fill me in please or is there an easier way than my attempt ?
Private Sub Command81_Click()
On Error GoTo Err_Command81_Click
Dim stDocName As String
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
MsgBox "print receipt", vbYesNo
If vbYes Then
stDocName = "Receipt query"
DoCmd.OpenReport stDocName, acNormal
elseif vbno ?????
Exit_Command81_Click:
Exit Sub
Err_Command81_Click:
MsgBox Err.Description
Resume Exit_Command81_Click
End If
End Sub
many thanks