Dear All,
I have an input Form called "InputMain" for table "Personal" and a field called [PPMembershipID]. This field is in text format. I want to check for duplicates if a new PPMembershipID entry already exists. I tried the following syntax but gave an error message.
Private Sub PPMemebershipID_AfterUpdate()
If DCount("*", "Personal", "[PPMembeershipID] = '" & Me![PPMembershipID] & "'") > 0 Then
MsgBox "Duplicate Exists", vbOKOnly
Cancel = True
End If
End Sub
The error message i got is "Can not find the filed 'PPMembershipID referred in your expression.
I tried in many ways but can not find the solution
Many thanks for your help
Solomon
I have an input Form called "InputMain" for table "Personal" and a field called [PPMembershipID]. This field is in text format. I want to check for duplicates if a new PPMembershipID entry already exists. I tried the following syntax but gave an error message.
Private Sub PPMemebershipID_AfterUpdate()
If DCount("*", "Personal", "[PPMembeershipID] = '" & Me![PPMembershipID] & "'") > 0 Then
MsgBox "Duplicate Exists", vbOKOnly
Cancel = True
End If
End Sub
The error message i got is "Can not find the filed 'PPMembershipID referred in your expression.
I tried in many ways but can not find the solution
Many thanks for your help
Solomon