T
Tom
Hi All,
I have a report that open only when the query found data.
Here is the code:
Private Sub Report_Open(Cancel As Integer)
If DCount("product", "TotalQuantities") = 0 Then
MsgBox "No data found for this date", vbOKOnly, "Inventory Matrix"
DoCmd.CancelEvent
End If
End Sub
How can I eliminate the Access message: " The OpenReport action was
canceled" ?
I tried DoCmd.set warnnings False, but it didnt work.
TIA,
Tom
I have a report that open only when the query found data.
Here is the code:
Private Sub Report_Open(Cancel As Integer)
If DCount("product", "TotalQuantities") = 0 Then
MsgBox "No data found for this date", vbOKOnly, "Inventory Matrix"
DoCmd.CancelEvent
End If
End Sub
How can I eliminate the Access message: " The OpenReport action was
canceled" ?
I tried DoCmd.set warnnings False, but it didnt work.
TIA,
Tom