Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why doesn't this check for duplicates work?

Status
Not open for further replies.
Feb 6, 2003
22
US
What's wrong with this AfterUpdate Event Procedure that's supposed to check for duplicates? I used the same procedure for address and it works - all I changed was address to Job# and for some reason it doesn't work for the Job# field. Job# is a text datatype.

Private Sub Job__AfterUpdate()
Me.RecordsetClone.FindFirst "[Job#] = '" & Job# & "'"

If Me.RecordsetClone.NoMatch Then
'do nothing
Else
MsgBox "WARNING - A record already exists with this Job#."
End If
End Sub


Thanks,
Michelle
 
Hi,

This may or may not be the problem... I'm not sure that you should be using the # symbol in your variable name.




There are two ways to write error-free programs; only the third one works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top