G
Guest
Hi,
I have successfully created code that will cancel an event based on the
value of a control. However, after the Event is Cancelled, I would like a
MsgBox to display. I do not know the right code.
The following code is on the BeforeUpdate Event of a control chkBoxControl,
referencing the [txtCompleteDate] control.
If IsNull([txtCompleteDate]) Then
Me.[txtCompleteDate] = Date
Else
DoCmd.CancelEvent
End If
after DoCmd.CancelEvent, I would like
MsgBox (The reason the event has been cancelled)
Can that be done? I tried it and it didn't work for me.
Thank you
Capt OhNo
I have successfully created code that will cancel an event based on the
value of a control. However, after the Event is Cancelled, I would like a
MsgBox to display. I do not know the right code.
The following code is on the BeforeUpdate Event of a control chkBoxControl,
referencing the [txtCompleteDate] control.
If IsNull([txtCompleteDate]) Then
Me.[txtCompleteDate] = Date
Else
DoCmd.CancelEvent
End If
after DoCmd.CancelEvent, I would like
MsgBox (The reason the event has been cancelled)
Can that be done? I tried it and it didn't work for me.
Thank you
Capt OhNo