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
Expand|Select|Wrap|Line Numbers
- 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