I would like to give the user the option to display a sub report using a message box.
This is the code I have tried, unsuccessfully:
Private Sub cmdPrint_Click()
Dim res As Integer
DoCmd.RunCommand acCmdSaveRecord
If MsgBox("Do you want to include missing criteria on the reply to contractor?", _
VbMsgBoxStyle.vbYesNo Or VbMsgBoxStyle.vbQuestion Or VbMsgBoxStyle.vbDefaultButton2, _
"Include Missing Criteria?") = vbYes Then
DoCmd.OpenReport "rptSubmittalReplyWhere", acViewPreview, ,
Me.rptMissingCritieriaWhere.Visible = True
Else
DoCmd.OpenReport "rptSubmittalReplyWhere", acViewPreview, ,
End If
End Sub
I get an error saying "rptMissingCritieriaWhere" is not found.
This is the code I have tried, unsuccessfully:
Private Sub cmdPrint_Click()
Dim res As Integer
DoCmd.RunCommand acCmdSaveRecord
If MsgBox("Do you want to include missing criteria on the reply to contractor?", _
VbMsgBoxStyle.vbYesNo Or VbMsgBoxStyle.vbQuestion Or VbMsgBoxStyle.vbDefaultButton2, _
"Include Missing Criteria?") = vbYes Then
DoCmd.OpenReport "rptSubmittalReplyWhere", acViewPreview, ,
Me.rptMissingCritieriaWhere.Visible = True
Else
DoCmd.OpenReport "rptSubmittalReplyWhere", acViewPreview, ,
End If
End Sub
I get an error saying "rptMissingCritieriaWhere" is not found.