L
Lee Stafford via AccessMonster.com
I had looked over previous threads and found one that works for me, except
I get my message and one that Access generates.
"The value in the field violates a validation rule for the record or
field." "For example you may have changed a validation rule without
verifying whether the existing data matches the new validation rule."
It only displays it the first time that the incorrect number is entered. I
guess I could live with it, but is there a way that I could have one or the
other? Here is my code. Tia, Lee
Private Sub WONumber_BeforeUpdate(Cancel As Integer)
If DLookup("WONUMBER", "TBL_QA_WO_INFO", "WONUMBER=[forms]!
[FRM_QaFieldEntryForm].[WONumber]") = WONumber Then
MsgBox "Duplicate Work Order Number" & vbCrLf & "Check your number and
try again"
Cancel = True
End If
End Sub
I get my message and one that Access generates.
"The value in the field violates a validation rule for the record or
field." "For example you may have changed a validation rule without
verifying whether the existing data matches the new validation rule."
It only displays it the first time that the incorrect number is entered. I
guess I could live with it, but is there a way that I could have one or the
other? Here is my code. Tia, Lee
Private Sub WONumber_BeforeUpdate(Cancel As Integer)
If DLookup("WONUMBER", "TBL_QA_WO_INFO", "WONUMBER=[forms]!
[FRM_QaFieldEntryForm].[WONumber]") = WONumber Then
MsgBox "Duplicate Work Order Number" & vbCrLf & "Check your number and
try again"
Cancel = True
End If
End Sub