You are here:

Using MS Access/Possible Duplicate Formula

Advertisement


Question
I'm using the contacts database template.  There is a formula that recognizes duplicate names.  I want to modify this formula to find duplicates in a different field and not the name field.  What do I need to change? This is the current formula.  My new field is DOC Number.  Where do I put it so it will find duplicates.  Thanks for your help!!  You're awesome!!  

=IIF(dcOUNT(“*”,”[ContactsExtended]”,”[ID],.” & Nz([ID],0) & “And [Contact Name] = ‘” & Replace(Nz([Contact Name]),”’”,”””)&”’”)>0,”Possible Duplicate”,””)

Answer
It might help if you showed me the structure of your table. But Changing Contact Name to DOC Number seems to be the answer. Assuming Doc Number is a string value.

Is DOC Number a foreign key in this table?

Hope this helps,
Scott<>
Blog: http://scottgem.wordpress.com
Website: http://www.diamondassoc.com
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 25 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

Education/Credentials
Brooklyn College BA

©2016 About.com. All rights reserved.