G
Guest
I am trying to write code that says if Status_Code = "Inactive" and
Vendor_Nbr <> 0, then Contract_End_Date is required. I put the following at
the BeforeUpdate event and am getting a Do Menu Item cancelled error message
when I try to save the record and purposely leave out required data (from
other fields as a test) - I get the correct error message for the missing
data but keep getting this DoMenu Item action cancelled error message box
right after the first message about the missing data. Thanks for any help!
Here's the code:
If (Me.Status_Code = "Inactive" And Vendor_Nbr <> 0 And
IsNull(Me.Contract_End_Date)) Then
strMsg = strMsg & "Please enter a Contract End Date." & vbCrLf
Cancel = True
End If
Vendor_Nbr <> 0, then Contract_End_Date is required. I put the following at
the BeforeUpdate event and am getting a Do Menu Item cancelled error message
when I try to save the record and purposely leave out required data (from
other fields as a test) - I get the correct error message for the missing
data but keep getting this DoMenu Item action cancelled error message box
right after the first message about the missing data. Thanks for any help!
Here's the code:
If (Me.Status_Code = "Inactive" And Vendor_Nbr <> 0 And
IsNull(Me.Contract_End_Date)) Then
strMsg = strMsg & "Please enter a Contract End Date." & vbCrLf
Cancel = True
End If