JeffBarker
Registered User.
- Local time
- Today, 12:14
- Joined
- Dec 7, 2010
- Messages
- 130
Hi guys,
I'm sure this is an absurdly easy question to answer, but after plenty of Googling and searching in these forums, I can't find the answer that I'm looking for.
It's been ages since I had to do any coding, so am a bit rusty! :banghead:
Anyway, all I'm looking to do is stop the On Close event of my Tent Cards report from firing if there's no data in the recordsource behind it:
So literally want to have the above 'missed' or stepped over if there's no data in the recordsource...could someone assist with the correct code to achieve this, please?
The code I have in the NoData event is as follows:
Thanks in advance, guys.
Jeff.
I'm sure this is an absurdly easy question to answer, but after plenty of Googling and searching in these forums, I can't find the answer that I'm looking for.
It's been ages since I had to do any coding, so am a bit rusty! :banghead:
Anyway, all I'm looking to do is stop the On Close event of my Tent Cards report from firing if there's no data in the recordsource behind it:
Code:
Dim vResult As Integer
vResult = MsgBox("Flag Tent Cards as printed?", vbYesNo, "Tent Cards")
If vResult = vbNo Then
Forms![frmPrintOptionTent].Visible = True
Exit Sub
Else
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryMarkTentCardsAsPrinted", acViewNormal
DoCmd.SetWarnings True
End If
So literally want to have the above 'missed' or stepped over if there's no data in the recordsource...could someone assist with the correct code to achieve this, please?
The code I have in the NoData event is as follows:
Code:
MsgBox "There are no Tent Cards to Print", vbExclamation, "Event Manager - AHCP 2017"
Cancel = True
Thanks in advance, guys.
Jeff.
Last edited: