Consulting

Results 1 to 6 of 6

Thread: Solved: Problem with the 'Find Duplicates Query Wizard' in Access 2007

  1. #1

    Solved: Problem with the 'Find Duplicates Query Wizard' in Access 2007

    Hi,

    I am having a problem with the 'Find Duplicates Query Wizard' in Access 2007. The wizard does not seem to be matching blank fields as duplicates.

    For example
    "NAME", "DOB", "MARKS", "GRADE"
    "John Smith", "9/1/1984", "92", ""
    "John Smith", "9/1/1984", "92", ""
    is not considered as a duplicate whereas


    For example
    "NAME", "DOB", "MARKS", "GRADE"
    "John Smith", "9/1/1984", "92", "A"
    "John Smith", "9/1/1984", "92", "A"
    is considered a duplicate.

    Why does this happen? And is there a way to get around this problem?

  2. #2
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    Unless I am wrong, Access does dot consider a blank field when checking for dups. Because there is nothing in it, no value to compare.

    I noticed that the blank field has no Field name if indeed that is what they are.

    Your out of luck as it appears the routine is running correctly.
    Peace of mind is found in some of the strangest places.

  3. #3
    Hi austenr,

    In my example the blank fields are under the Grade field name. If the blank fields are not considered then the two values should be treated as duplicates as all the remaining fields match, right?

    However, access does not treat them as duplicates..

  4. #4
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location
    But my answer to you is still that nothing compared to nothing in the eyes of Access is not a duplicate. It sees that there is no data so it is ignored. There must be something in that field to compare it to.

    Test it by making a blank table and running the query wizard. See what result you get.
    Peace of mind is found in some of the strangest places.

  5. #5
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Of course a simple solution might be using nz. If your query is evaluating nz(Grade, "ZZZ") then you'll find your duplicates even if they're blank.

  6. #6
    Thanks geekgirl. This is a great workaround for what I needed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •