Results 1 to 4 of 4
  1. #1
    DCV0204 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    85

    combine 2 records data to one record if one field matches

    Hi, I need some help combining multiple records when the ProviderNPI matches another record. Here is some information from my table:
    LastName ProviderNPI GroupName GroupNPI
    Potter 1538340682 Christ Community Health Services, Inc. 1053572206
    Potter 1538340682 Christ Community Health Services, Inc. 1841513058
    Potter 1538340682 Christ Community Health Services, Inc. 1982686614


    as you can see I have 3 records with the same LastName, ProviderNPI and GroupName; but the GroupNPI is different for each record.
    I would like to combine these into one record to look like this:
    LastName ProviderNPI GroupName GroupNPI Gr2_Name Grp2_NPI Gr3_Name Grp3_NPI Gr4_Name Grp4_NPI
    Potter 1538340682 Christ Community Health Services, Inc. 1053572206 Christ Community Health Services, Inc. 1841513058 Christ Community Health Services, Inc. 1982686614





    Thanks,
    Lisa

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    Why would you want to denormalize data?
    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.

  3. #3
    DCV0204 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    85
    Because I am wanting to mail merge the information into a letter. Is this possible in a query?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    What you want won't be easy, denormalizing seldom is, especially because each LastName will not have the same number of records and the field names you want are not generated by data as would be done in a CROSSTAB query. Also, I don't think mail merge works nice with calculated fields. Will probably require VBA code to accomplish, possibly having to write records to a temp table and use that table as the data source for the mail merge.

    Review http://forums.aspfree.com/microsoft-...ry-322123.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. Replies: 1
    Last Post: 01-30-2013, 03:27 PM
  2. Replies: 1
    Last Post: 11-08-2012, 02:37 PM
  3. Replies: 2
    Last Post: 10-02-2012, 03:18 PM
  4. Creating unique record from record and field data
    By arthurpenske in forum Access
    Replies: 3
    Last Post: 08-24-2011, 06:11 PM
  5. Replies: 8
    Last Post: 01-21-2011, 10:28 AM

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