no data message

I

iccsi

"The openreport action was cancelled " message shows up when I set
report cancel is true.

Are there any way to let message does not show up?

Your help is great appreciated,
 
M

Marshall Barton

iccsi said:
"The openreport action was cancelled " message shows up when I set
report cancel is true.

Are there any way to let message does not show up?


Use error handling to trap and ignore error 2501 in the
Click event procedure of the form button used to open the
report. The general idea could be something like this air
code:

On Erro GoTo ErrHandler
. . .
DoCmd.OpenReport . . .
ExitHere:
Exit Sub

ErrHandler:
Select Case Err.Number
Case 2501
Resume Next
Case Else
MsgBox Err.Number & " - " & Err.Description
Resume ExitHere
End Select
End Sub
 
Top