M
Maggie
I'm trying to prevent a report from printing whenever
there is no data in the underlying recordset. Not sure
what I'm doing wrong.
When I enter this code:
Cancel = True
MsgBox "There is no data for the key you entered."
into the "OnNoData" event of my report, I get error msg
" The OpenReport action was cancelled"
Run-time error '2501'
back in the calling form at this line of code:
DoCmd.OpenReport "projSearchAdminByArch", acViewPreview, ,
strSQL
there is no data in the underlying recordset. Not sure
what I'm doing wrong.
When I enter this code:
Cancel = True
MsgBox "There is no data for the key you entered."
into the "OnNoData" event of my report, I get error msg
" The OpenReport action was cancelled"
Run-time error '2501'
back in the calling form at this line of code:
DoCmd.OpenReport "projSearchAdminByArch", acViewPreview, ,
strSQL