S
Scott
I have a before update event procedure to check if the new data has been
entered or not as below:-
Private Sub txtSupplier_BeforeUpdate(Cancel As Integer)
If DCount("*", "tblSupplier", "[Supplier] = '" & Me.txtSupplier & "'") >
0 Then
MsgBox "This Supplier has been registered before!"
Cancel = True
End If
End Sub
If I enter a repeated data into the field, the reminder box appears. I
click OK button and it comes up another box as below:-
The value in the field or record violates the 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.
Click Undo on the Edit menu to restore the previous value, or enter a new
value that meets the validation rule for the field.
As I have my error message, how can I avoid this one.
Thanks,
Scott
entered or not as below:-
Private Sub txtSupplier_BeforeUpdate(Cancel As Integer)
If DCount("*", "tblSupplier", "[Supplier] = '" & Me.txtSupplier & "'") >
0 Then
MsgBox "This Supplier has been registered before!"
Cancel = True
End If
End Sub
If I enter a repeated data into the field, the reminder box appears. I
click OK button and it comes up another box as below:-
The value in the field or record violates the 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.
Click Undo on the Edit menu to restore the previous value, or enter a new
value that meets the validation rule for the field.
As I have my error message, how can I avoid this one.
Thanks,
Scott