Results 1 to 2 of 2
  1. #1
    cmf0106 is offline Novice
    Windows XP Access 97
    Join Date
    Dec 2009
    Posts
    6

    Query Help (picture)

    I have a large database of names, I would like to produce a query that reveals anyone that appears in the database more than once.\

    For instance in the image below "Sayprasith, Nick & S Kaye S" are listed twice in the database. I would like an output showing anyone that has their name repeat two times or more within the "owner_name" column. Ideally the output would be in such a way that preserves the "account number" field as well.



    Click image for larger version. 

Name:	owner na2me.jpg 
Views:	4 
Size:	117.6 KB 
ID:	11520

    Based on the above image the ideal output would be:

    Account Number Owner Name
    00015121 Sayprasith, Nick & S Kaye S
    00015148 Sayprasith, Nick & S Kaye S

    Only it would be for the whole database that consists of many thousand records.

    Thanks
    Attached Thumbnails Attached Thumbnails owner name.jpg  

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,795
    One method uses DCount domain aggregate function.

    SELECT Account_Num, Owner_Name FROM tablename WHERE DCount("*", "tablename", "Owner_Name='" & [Owner_Name] & "'")>1;

    Another method would involve subquery http://allenbrowne.com/subquery-01.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query Error (Picture)
    By samanthaM in forum Access
    Replies: 3
    Last Post: 11-11-2012, 12:35 AM
  2. path for the picture
    By white_flag in forum Access
    Replies: 7
    Last Post: 09-20-2011, 05:55 AM
  3. Attachment Picture
    By cggriggs in forum Forms
    Replies: 0
    Last Post: 06-14-2011, 10:17 AM
  4. Adding a Picture
    By MFS in forum Programming
    Replies: 4
    Last Post: 01-18-2010, 07:19 AM
  5. Inserting a picture
    By Carenas in forum Forms
    Replies: 0
    Last Post: 01-03-2009, 05:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums