G
gopi
Hi, im tyring to prompt the user with a message everytime a duplicate value
is entered in a field. But i cant seem to get it working, the code im using
is:
------------------------------------
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not IsNull(DLookup("*", "South_Tracker", "[Upgrade Number] =" &
Me.Text228.Value)) Then
MsgBox "Record Exist"
End If
End Sub
-----------------------------------
South_Tracker is the table name,
Upgrade Number is the field name in the table (which is a primark key)
Text228 is the field name in the form.
If anyone can help me with this code, i would much appreciate it.
Thanks
is entered in a field. But i cant seem to get it working, the code im using
is:
------------------------------------
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not IsNull(DLookup("*", "South_Tracker", "[Upgrade Number] =" &
Me.Text228.Value)) Then
MsgBox "Record Exist"
End If
End Sub
-----------------------------------
South_Tracker is the table name,
Upgrade Number is the field name in the table (which is a primark key)
Text228 is the field name in the form.
If anyone can help me with this code, i would much appreciate it.
Thanks