i want to check if data entered in a form field is existed
the form is bounded to a table
i used this code
everything is ok but if the data is existed the database show the message and clear the field but i'm getting a Run-time error
'-2147352567(80020009)': the macro or function set to the beforeupdate or validationRule property for this field is preventing [ISF] from saving the data in the field
i guess the problem because the form is bounded to a table so he will save automatically
my solution is to unbound the fields and save the data via vba
but is there any solution with a bounded form???
the form is bounded to a table
i used this code
Code:
If DLookup("Telegram_Number", "tbl_Violation_Of_Building", "Telegram_Number Like " & Forms!frm_Add_Violation_Building!Telegram_Number) Then
MsgBox ("number existed")
Me.Telegram_Number = ""
Else
End If
everything is ok but if the data is existed the database show the message and clear the field but i'm getting a Run-time error
'-2147352567(80020009)': the macro or function set to the beforeupdate or validationRule property for this field is preventing [ISF] from saving the data in the field
i guess the problem because the form is bounded to a table so he will save automatically
my solution is to unbound the fields and save the data via vba
but is there any solution with a bounded form???