A
ATSBC03
I have created a form to filter my report. The report is based on a query and
the form is an unbound form with combo boxes and text fields to allow data to
be selected. I have been trying to set up the cancel but to cancel the report
and close the form. However, it is not working and when the cancel button is
selected it runs the report with all data.
Private Sub btncancel_Click()
Cancel = True
DoCmd.Close acForm, "frmSiteDept"
End Sub
When I have tried to do a DoCmd.Close acReport, "rptAllComments" I get an
error message stating that I cannot perform that operation while a report or
form is running. I am at a loss as to what to do. Any help would be greatly
appreciated.
the form is an unbound form with combo boxes and text fields to allow data to
be selected. I have been trying to set up the cancel but to cancel the report
and close the form. However, it is not working and when the cancel button is
selected it runs the report with all data.
Private Sub btncancel_Click()
Cancel = True
DoCmd.Close acForm, "frmSiteDept"
End Sub
When I have tried to do a DoCmd.Close acReport, "rptAllComments" I get an
error message stating that I cannot perform that operation while a report or
form is running. I am at a loss as to what to do. Any help would be greatly
appreciated.