G
Guest
A report is generated from user input. However, if there is no data in the
report, I have it set up so that a message box appears saying there is no
data for the query and then the report closes. To determine that the report
has no data I use the report's 'On No Data' event. Since I was not able to
get 'DoDmd.Close acReport' to work under this event, I placed it in the 'On
Page' event.
Everything works fine, Except the message box appears twice. Is there a way
to prevent this. Or perhaps, there is a better approach.
To reiterate, what I want to do is if the report has no data, produce a
message and then when the OK is clicked, close the report.
report, I have it set up so that a message box appears saying there is no
data for the query and then the report closes. To determine that the report
has no data I use the report's 'On No Data' event. Since I was not able to
get 'DoDmd.Close acReport' to work under this event, I placed it in the 'On
Page' event.
Everything works fine, Except the message box appears twice. Is there a way
to prevent this. Or perhaps, there is a better approach.
To reiterate, what I want to do is if the report has no data, produce a
message and then when the OK is clicked, close the report.