G
Guest
I was trying to code using If Then based on a post I read but I think I'm
using the wrong code.
In my form I want if you answer "yes" to variable 1 then variable 2 must be
completed however the code I am currently using required variable 2 to be
completed regardless if the answer is "yes" or "no"
I am new to access and the world of coding please help! Here is the code I
am using:
If Not IsNull(Me.Injuries_to_Staff) And IsNull(Me.Explain_Injury) Then
Cancel = True
MsgBox "Explanation of Injury Is Required"
Me.Explain_Injury.SetFocus
End If
THANKS!!!!!!!!!!!
using the wrong code.
In my form I want if you answer "yes" to variable 1 then variable 2 must be
completed however the code I am currently using required variable 2 to be
completed regardless if the answer is "yes" or "no"
I am new to access and the world of coding please help! Here is the code I
am using:
If Not IsNull(Me.Injuries_to_Staff) And IsNull(Me.Explain_Injury) Then
Cancel = True
MsgBox "Explanation of Injury Is Required"
Me.Explain_Injury.SetFocus
End If
THANKS!!!!!!!!!!!