Results 1 to 3 of 3
  1. #1
    morlasr is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    2

    Use Macro or VB to change column title automatically

    Hi everyone,

    I really need help with this, I'm a beginner with Access.



    I'm making a db that will import a spreadsheet from Excel, then separate it into 3 different tables using queries, but then I need to put all the 3 different tables together one after the other. The problem is that the 3rd column on each table have different names on each table, so I can't append the tables together.

    So, how can I use a Macro or something to change the column name on all 3 different tables so that they match and can all get appended together.

    Thanks, everyone!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    I don't understand. You import one table, split into 3 tables, then recombine them into 1 table? Can you explain more about what is happening? Even provide files? Follow instructions at bottom of my post.

    It is not necessary to change the table field name in order to combine with other table field. Use an alias name in the query. Is the query a UNION?
    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
    morlasr is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Posts
    2
    Oh, I didn't know about Aliases...I got it to work. Thanks so much!

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

Similar Threads

  1. Replies: 1
    Last Post: 08-18-2011, 08:35 AM
  2. Replies: 3
    Last Post: 06-03-2011, 03:09 PM
  3. Replies: 0
    Last Post: 01-12-2011, 12:43 PM
  4. Change linked table reference automatically
    By kjuelfs in forum Access
    Replies: 1
    Last Post: 07-20-2010, 09:14 AM
  5. Replies: 1
    Last Post: 01-26-2010, 10:36 PM

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