Finding Duplicate Values

  • Thread starter FRASER HETHERINGTON
  • Start date
F

FRASER HETHERINGTON

I have a form called frmJobCreate which has a text field called JobNo, I'd
like to check this value against the values in a field called JobNo in a
table called tblJobCreated and then display a message if there is a
duplicate value, any help would be greatly appreciated, thanks in advance
 
D

Douglas J. Steele

If DCount("*", "tblJobCreated", "JobNo = '" & Me.JobNo & "'") > 0 Then
MsgBox JobNo & " exists in tblJobCreated"
End If
 
F

FRASER HETHERINGTON

That's Brilliant works a charm, thanks

Douglas J. Steele said:
If DCount("*", "tblJobCreated", "JobNo = '" & Me.JobNo & "'") > 0 Then
MsgBox JobNo & " exists in tblJobCreated"
End If
 
Top