Hello, i have a report with dao code in its onload event.
it contains the following if statement for its associated recordset:
If rs.bof and rs.eof then
cancel opening report.
else
do something else
end if
the problem i have is with the code to cancel the opening of the report. it goes into the if statment ok.
i thought i could just use: Exit Sub
but then i realised this doesn't stop the report from opening. i have also tried: rtpReportName.close with no luck.
I know there is a simple statement i can use, but stupid me cant seem to figure it out.
Any help would be greatly appreciated thanks.
it contains the following if statement for its associated recordset:
If rs.bof and rs.eof then
cancel opening report.
else
do something else
end if
the problem i have is with the code to cancel the opening of the report. it goes into the if statment ok.
i thought i could just use: Exit Sub
but then i realised this doesn't stop the report from opening. i have also tried: rtpReportName.close with no luck.
I know there is a simple statement i can use, but stupid me cant seem to figure it out.
Any help would be greatly appreciated thanks.