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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

dlookup or dsum 4
VB.NET Datasets 0
Linking reference cells in two tables 3
linking form to record 1
Correct Syntax 1
Access Validation rule in MS access 2010 1
Macro reports 1
HELP - Finding Max/Min 2

Top