Hi I'm trying to put this code for a form to check duplicate values such as last names but I get a compile error.I have Office2000 rpofessional.Here is the code I tried.
Private Sub State_AfterUpdate()
IfNot IsNull(DLookup("[LastName]", "Customers", "CustomerID=" & Forms!Customers!LastName & ""
Then MsgBox ("That entry used,blah.."
End If
End Sub
I hope anybody can help me thanks
Private Sub State_AfterUpdate()
IfNot IsNull(DLookup("[LastName]", "Customers", "CustomerID=" & Forms!Customers!LastName & ""
End If
End Sub
I hope anybody can help me thanks