
Originally Posted by
pbaldy
Yes; you want the version referring to a form control, and the word "Criteria" needs to be the field name you're comparing the value on the form against. Oh, and code builder was correct.
Thank you for your help, by the way, I really appreciate it. I changed to the version referring to a form control, however it still is not notifying me of entering a duplicate. Here is what I have:
Code:
Option Compare Database
Private Sub IssueID_BeforeUpdate(Cancel As Integer)
If DCount("IssueID", "Issue", "IssueID = " & Forms![Issue]!IssueID) > 0 Then
Cancel = True
MsgBox "Already entered"
End If
End Sub
Any suggestions?