I have a report that I open via a form. The form contains two text boxes which define the date range of the report, so I have left the form open when running the report.
I would like to close the form when closing the report, but am encountering a code issue with the form close event:
Private Sub Report_Close()
DoCmd.Close acForm, frmWhatDates_Report, acSaveNo
End Sub
The error is a missing object name argument, so I presume there is an issue with how I have specified the name of the form to be closed. I've tried quotes as well with no success.
Thanks!
I would like to close the form when closing the report, but am encountering a code issue with the form close event:
Private Sub Report_Close()
DoCmd.Close acForm, frmWhatDates_Report, acSaveNo
End Sub
The error is a missing object name argument, so I presume there is an issue with how I have specified the name of the form to be closed. I've tried quotes as well with no success.
Thanks!