Here is my code and it works great but it queries for duplicate records threw out my whole projects table, and in would like for it to filter its search via the client ID. Any Suggestions?
Private Sub ProjectName_BeforeUpdate(Cancel As Integer)
Dim stLinkCriteria As String
stLinkCriteria = "ProjectName='" & Me!ProjectName & "'"
If (Not IsNull(DLookup("ProjectName", "Projects", _
"ProjectName ='" & Me!ProjectName & "'"))) Then
MsgBox "<<Warning!>> Debtor has already been entered in the database!"
End If
End Sub
Sincerely,
Charles
Private Sub ProjectName_BeforeUpdate(Cancel As Integer)
Dim stLinkCriteria As String
stLinkCriteria = "ProjectName='" & Me!ProjectName & "'"
If (Not IsNull(DLookup("ProjectName", "Projects", _
"ProjectName ='" & Me!ProjectName & "'"))) Then
MsgBox "<<Warning!>> Debtor has already been entered in the database!"
End If
End Sub
Sincerely,
Charles