Duplicates

Richio

Registered User.
Local time
Today, 19:22
Joined
May 31, 2002
Messages
75
I've tried and I am sure it is simple......I need a message box to appear when a duplicate entry (tel no) is attempted to be entered onto a form and to proceed if OK

I have put the following in the before update on the field property on the form

If Not IsNull(DLookup("[Tel No]", "Lead Slip", "[Tel No] = " & Me.[Tel No])) Then
MsgBox "Duplicated"
Me.Undo
Cancel = True
End If

I found this on another posting to this forum. Tel No is my field in the form and on the table. Lead Slip is my table name

It just doesn't want to work and keeps coming up with debugging errors

Any help would be great!!

Thanks
 
it would appear that your table field and your textbox for [Tel No] are named the same. That can't be possible, it won't work.

Rename your textbox to something like txtTelNo and then you should have better luck.
 

Users who are viewing this thread

Back
Top Bottom