Results 1 to 4 of 4
  1. #1
    Cazca is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2015
    Posts
    28

    Two columns stacked into one on different table

    Hi folks.

    I'm using MS Access 2010 with a frontend/backend type database.

    I'm attempting to take two columns (Name1, Name2) from one table and combine (stack) them into another.

    Original:


    Name1 Name2
    Smith Lawson
    Doel Carl

    Desired Result:
    Name
    Smith
    Doel
    Lawson
    Carl


    I can run a query to union the two columns in Table1, but how do I get them from the query to Table2?

    Any help is greatly appreciated!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    2 append queries,
    insert NAME1 into table
    insert NAME2 into table

  3. #3
    Cazca is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2015
    Posts
    28
    The goal is once names are deleted from the Original table (where they are seperated into 2 columns), that it deletes from the Combined Table. Would you have to run a query each time to do this, or could you set the query to run when the table opens?

    Thanks!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    How are you opening table? Why are you opening table? Users should not work directly with tables and queries, only forms and reports.

    Why would you delete from combined table when you just inserted them into table? Action SQL statements can be run from code.
    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: 2
    Last Post: 10-26-2015, 06:14 AM
  2. Stacked column and line chart
    By Soumya in forum Programming
    Replies: 1
    Last Post: 10-14-2015, 09:28 AM
  3. Reporting stacked data from qry in columns
    By SPW_12 in forum Reports
    Replies: 3
    Last Post: 01-17-2012, 04:34 PM
  4. Stacked report with multiple columns
    By BeachRum1962 in forum Reports
    Replies: 6
    Last Post: 09-19-2011, 11:04 AM
  5. VBA and stacked queries
    By Pudy in forum Queries
    Replies: 0
    Last Post: 11-28-2006, 03:58 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