1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access duplicate records

Discussion in 'Business Applications' started by Erm, Jan 16, 2013.

Thread Status:
Not open for further replies.
  1. Erm

    Erm Thread Starter

    Joined:
    Jul 30, 2003
    Messages:
    298
    I have the following code in a text box on a form:

    =IIf(DCount("*","[qryContactsExtended]","[ID]<>" & Nz([ID],0) & " And [ContactName] = '" & Replace(Nz([ContactName]),"'","''") & "'")>0,"Possible Duplicate","")

    It just comes up saying #Name?

    Any ideas?

    Thanks in advance.
     
  2. draceplace

    draceplace

    Joined:
    Jun 8, 2001
    Messages:
    2,583
    Quite a complex string to troubleshoot visually, #Name often means Access can't resolve a field or control name. Fully qualifying the [ContactName].[Table1] if its in tables and queries could help. Also if the text box itself doesn't have a unique name that can cause the error.

    Also the DCount function is very touchy (technical term :) ) about its syntax. You might pull it out individually and make sure its working correctly.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1085543

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice