Results 1 to 4 of 4
  1. #1
    Bkper087 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    81

    Handling Repeated/Mirror Records in a Query as a result of One to Many Relationship

    I have built a contacts manager based on an Outlook export (I know I can link the two programs, but I wanted to customize the contacts a bit further). I built the database in a way that phone numbers, addresses, etc. allow for multiple entries for each person under the same column using a foreign key. The only difference is a field called "Type" which designates the entry for Home, Work, etc. The issue I ran into is when I queried the data I get multiple entries for the same record. As you are all likely aware, Access repeats the data in a query for each different case. For example if Bob Jones has a personal and work phone number, Access will show the results in a query like this:

    1. Bob Jones 555-555-5555 Personal


    1. Bob Jones 555-222-2222 Work
    2. Jerry Smith 555-111-1111 Personal

    If I kept the data in Access it wouldn't necessarily be an issue. However, I want to be able to export the data in an excel file. How do I get Excel to return the data so it looks like this:

    1. Bob Jones 555-555-5555 Personal 555-222-2222 Work
    2. Jerry Smith 555-111-1111 Personal

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I would probably start with a Report Object and use grouping to get, at least close to, what you want. Then, export the report as an Excel file.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    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.

  4. #4
    Bkper087 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    May 2014
    Posts
    81
    June7 I used the link you posted. Its not exactly what I had in mind, but it will work just fine. Thanks!

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

Similar Threads

  1. Replies: 4
    Last Post: 03-03-2015, 01:36 PM
  2. Handling Records with many Fields
    By Kyle Genova in forum Database Design
    Replies: 4
    Last Post: 07-02-2013, 02:45 PM
  3. Handling Null DLookup result
    By j6sander in forum Access
    Replies: 1
    Last Post: 07-19-2012, 11:07 AM
  4. Hi, How do we avoid repeated records?
    By radicrains in forum Queries
    Replies: 11
    Last Post: 11-04-2010, 03:00 AM
  5. Repeated rows in query-form
    By astraxan in forum Forms
    Replies: 2
    Last Post: 05-23-2010, 10:25 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