Referring to another event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have some code that does complex validation in the form's before update
event. If the validation fails, I set cancel to True. How can I reference
whether the cancel was true or false in a subsequent or calling event? I
want to construct an if statement, but don't know the syntax.

If Forms!frmFormName (cancel) Then
do this if true
Else
do this if false
End If
 
I don't know that you can. Instead you should probably set a module level
variable at the same time and then refer to it. You'll want to be sure to
set your custom variable to false when the update is going to succeed.
 
Back
Top