Hi,
Original post EDITED:
In a Report_Open method, if there are no records I would like to display a messagebox with a warning message (specified by me) and then Cancel the Report from opening. I don't want a messagebox popping up telling the user that the report opening has been cancelled.
How would I do these things and is the Report_Open method the correct place in which to do it?
The VBA in a Button_Click event (on a form) passes over the Queryname using OpenArgs:
DoCmd.OpenReport strReportName, acPreview, , , , strQueryName
...and the VBA in the Report_Open event sets the RecordSource:
Me.RecordSource = OpenArgs
Thank you for any help.
Original post EDITED:
In a Report_Open method, if there are no records I would like to display a messagebox with a warning message (specified by me) and then Cancel the Report from opening. I don't want a messagebox popping up telling the user that the report opening has been cancelled.
How would I do these things and is the Report_Open method the correct place in which to do it?
The VBA in a Button_Click event (on a form) passes over the Queryname using OpenArgs:
DoCmd.OpenReport strReportName, acPreview, , , , strQueryName
...and the VBA in the Report_Open event sets the RecordSource:
Me.RecordSource = OpenArgs
Thank you for any help.
Last edited: