Cwittmaack
Registered User.
- Local time
- Today, 12:23
- Joined
- Nov 3, 2009
- Messages
- 70
I am having a problem with the code in the Close event on a report when asking the user if they want to view additional reports after closing the current report in preview. Report Closes after the Yes/No answer is selected. If yes selected it does nothing. If No is selected it does nothing, This code works fine in a data entry form after changing the close and open commands. Using Access 2010
Thank you all.
Code Using Now.
Private Sub Report_Close()
Dim IntAnswer As Integer
IntAnswer = MsgBox("Would you like to View/Print additional Reports?", vbQuestion + vbYesNo, "Yes")
If IntAnswer = vbYes Then
DoCmd.Close acReport, "CONFERENCE LOG", acSaveNo
DoCmd.OpenReport "CONFERENCE LOG REPORT", acViewPreview
Else
DoCmd.Close acReport, "CONFERENCE LOG", acSaveNo
DoCmd.OpenForm "CONFMENU"
End If
End Sub
Thank you all.
Code Using Now.
Private Sub Report_Close()
Dim IntAnswer As Integer
IntAnswer = MsgBox("Would you like to View/Print additional Reports?", vbQuestion + vbYesNo, "Yes")
If IntAnswer = vbYes Then
DoCmd.Close acReport, "CONFERENCE LOG", acSaveNo
DoCmd.OpenReport "CONFERENCE LOG REPORT", acViewPreview
Else
DoCmd.Close acReport, "CONFERENCE LOG", acSaveNo
DoCmd.OpenForm "CONFMENU"
End If
End Sub