wiklendt
i recommend chocolate
- Local time
- Tomorrow, 04:02
- Joined
- Mar 10, 2008
- Messages
- 1,746
If I run the form I get no data ...
Popup (There are no records for that selection)
Popup (The Open Report action was cancelled)
Hello,
i'm setting up NoData handling in some of my reports. my issue is that i don't know how to prevent the second default popup ("The OpenReport action was cancelled"). I don't want my users to have to click twice for the same report - they have already been told there is no data via a personalised popup (the first one)... i tried the set warnings false before the cancel action, then true after again but it gives me an error "argument not optional" and it highlights my setwarnings true argument in debug.
perhaps i got the syntax/order of actions incorrect?
Code:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "There is no exercise data for this horse." _
& Chr(13) & "Please add some data before creating a report." _
, vbInformation, "The PED - No data"
DoCmd.SetWarnings = False
Cancel = True
DoCmd.SetWarnings = True
End Sub
wiklendt