Hello,
I'm trying to get rid of duplicate entries for contacts. So in my contact entry form when the save buttom is clicked I want to use the DCount function to see if there are duplicates. Here is the code I'm trying to use
It is not working and I've tried different ways to write it but I can't get it right. My fields are text fields.
Thanks in advance for the help
I'm trying to get rid of duplicate entries for contacts. So in my contact entry form when the save buttom is clicked I want to use the DCount function to see if there are duplicates. Here is the code I'm trying to use
Code:
If DCount("*", "contacts", [First_Name] = '" & _ Me.First_Name "' & [Last_Name] ='" & _ me.Last_Name " ') >0 Then MsgBox "contact already exists" Else MsgBox "all good" End If
Thanks in advance for the help
Comment