S
Shivalee Gupta via AccessMonster.com
I have a report which opens a parameter query. If the query is returning 0
(zero) rows, there should be a message saying "no rows returned" and then
the empty report should not open, I mean nothing should happen after that.
In the report, I went to "ON NO DATA" and I wrote:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "sorry"
DoCmd.Close
End Sub
These lines give me an error:
Run-Time error:2585.
The action can't be carried out while processing a form or report event.
What am I doing wrong?
Can anybody help me?
thanks
shivalee
(zero) rows, there should be a message saying "no rows returned" and then
the empty report should not open, I mean nothing should happen after that.
In the report, I went to "ON NO DATA" and I wrote:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "sorry"
DoCmd.Close
End Sub
These lines give me an error:
Run-Time error:2585.
The action can't be carried out while processing a form or report event.
What am I doing wrong?
Can anybody help me?
thanks
shivalee