Results 1 to 3 of 3
  1. #1
    registoni is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    13

    how to merge two or more tables horizontally with vba?


    I have a vba code that creates several tables [temp_financials2006, tem_financials2007,...,temp_financials2012], all with two fields : the 1st one is common for all tables (entity_ID) but second tables is different (Amount as per different year). I need to merge all tables into one, so that the1st column would be the Entity_ID and several other columns - one for amount per each year.

    Union query does only vertically merge, but I need horizontal merge (I need denormalize the table on purpose).

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    I think what you are looking for is a Cross-Tab Query: http://office.microsoft.com/en-us/ac...010229577.aspx

  3. #3
    registoni is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    13
    Quote Originally Posted by JoeM View Post
    I think what you are looking for is a Cross-Tab Query: http://office.microsoft.com/en-us/ac...010229577.aspx
    simple cross-tab query worked super! How could I forgot about this? Thanks alot.

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

Similar Threads

  1. Don't know if I should merge tables (please help)
    By bigdaddy757 in forum Database Design
    Replies: 2
    Last Post: 05-30-2013, 01:52 PM
  2. Merge linked tables!
    By thaonguyen1013 in forum Access
    Replies: 14
    Last Post: 02-01-2012, 04:03 PM
  3. Mail merge from two access tables
    By Peter in forum Access
    Replies: 2
    Last Post: 08-24-2010, 12:17 PM
  4. Mail Merge w/ data from 2 tables
    By sedain121 in forum Import/Export Data
    Replies: 3
    Last Post: 06-30-2010, 09:43 AM
  5. How do I Merge Four Tables Together
    By SteveI in forum Queries
    Replies: 1
    Last Post: 03-04-2010, 10:53 AM

Tags for this Thread

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