Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2016
    Location
    Chatsworth, GA (Northwest corner of state)
    Posts
    23

    Copy structure of existing table to a new table

    I am trying to automate a sequence of events which starts with the creation of a new table from an existing table, leaving the existing table undisturbed so as to be able to repeat the sequence later from the same beginning point.

    I have tried using various commands similar to
    CREATE TABLE new_table_name AS
    SELECT column1, column2,...
    FROM existing_table_name

    but they all give me a syntax error when I try to save it.

    I suspect that these fail because this form of SQL doesn't work in access.

    I am planning on completing the sequence using either a series of macros or a VBA procedure. I have already created the necessary SQL commands to complete the sequence, but I am currently having to do all of the individual commands manually.
    I would like to be able to execute the entire sequence by clicking on a single button.

    Any help would be appreciated.



    the structure of the file is as follows:
    Attached Thumbnails Attached Thumbnails Structure.jpg  

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Right click the table,paste as table_MT. Use this as the source.
    then when you need a copy, in a macro run CopyObject.

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

Similar Threads

  1. Replies: 3
    Last Post: 10-12-2016, 06:57 AM
  2. Adding data from linked table to existing table???
    By claysea in forum Import/Export Data
    Replies: 3
    Last Post: 02-21-2013, 12:23 PM
  3. Replies: 11
    Last Post: 07-24-2012, 07:50 PM
  4. Replies: 7
    Last Post: 04-15-2011, 08:46 AM
  5. Copy Table Structure (only) Problem
    By homerj56 in forum Access
    Replies: 1
    Last Post: 07-16-2010, 10:36 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