P
Perry Kew
I have the following which works on a text field. However,
it doesn't seem to work on a number field! The code below
was placed on a field called NumField in the AfterUpdate
property.
The field is not a Primary Key field and duplicates are
allowed in special cases.
If DCount("*", "tblData", "[NumField] ='" & Me.NumField
& "'") > 0 Then
MsgBox("This is a duplicate entry!",, "Duplicate")
DoCmd.CancelEvent
End if
Please help me with the above bit of faulty code. Thank
you.
--Perry
it doesn't seem to work on a number field! The code below
was placed on a field called NumField in the AfterUpdate
property.
The field is not a Primary Key field and duplicates are
allowed in special cases.
If DCount("*", "tblData", "[NumField] ='" & Me.NumField
& "'") > 0 Then
MsgBox("This is a duplicate entry!",, "Duplicate")
DoCmd.CancelEvent
End if
Please help me with the above bit of faulty code. Thank
you.
--Perry