Results 1 to 2 of 2
  1. #1
    cement is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    12

    how to insert records on some table using data on fields from other table

    Hi,
    in Access 2010
    i have two tables and i want to insert records to one table, using the data on fileds on the other table ?

    how can i do this ?
    what is the simplest way ?

    AFAIK i can use ADO connection to read the data from one table and the use INSERT command on the other one, but that is really a pain especially when there is more than 20 fields ...

    is there a better way ?



    is it possible to access tables and their data directly (not with ADO) in VBA macros ?!

    thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    The simplest way would be an append query:

    INSERT INTO DestinationTable (Field1, Field2, ...)
    SELECT Field1, Field2, ...
    FROM SourceTable

    You can add a WHERE clause as necessary.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 12-22-2010, 01:46 PM
  2. Replies: 1
    Last Post: 12-20-2010, 03:54 PM
  3. Table Fields and Sets of Records
    By kennyrogersjr in forum Access
    Replies: 2
    Last Post: 11-14-2010, 10:05 PM
  4. Replies: 3
    Last Post: 10-06-2010, 06:33 AM
  5. Replies: 0
    Last Post: 02-24-2010, 12:56 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