Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Merging records... (2000 sr-1)

    Have:
    c:anagrafica1.mdb
    table1
    field1, field2, field3,....field14
    and
    c:anagrafica2.mdb
    table2
    field1, field2, field3,....field14

    how to copy the records from table2 into tablel1 via VBA for Excel?

    note: no permit dupes based field1 and field1 of this 2 table

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Merging records... (2000 sr-1)

    In Access:

    Set a unique key on field1.
    Create a link in anagrafica1.mdb to table2 in the other database using File | Get External Data | Link Tables...
    Create an append query in anagrafica1.mdb that adds the records from table2 to table1.
    Save the query.

    In Excel:

    Create and open an ADODB connection to anagrafica1.mdb.
    Use the Execute method of the connection to run the append query.
    Close the connection.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Merging records... (2000 sr-1)

    tk!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •