Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2012

    Unanswered: Copy table from one database to another(current) database with data and indexes

    There is source database named DBsource with source table named tblA_MainBaseTable and destination database named DBDest with destination table table named tblA_MainBaseTable (same as source table)

    Now I want to delete the existing tblA_MainBaseTable in the DBDest and copy the new one from DBsource with data and indexes.

    DBSource is MS ACCESS 2010 (.accdb) and DBDest is MS ACCESS 2003.

    Found the following link but I am getting lot of error messages if I use this sample code.
    support microsoft com/kb/108147

    Anybody has working sample source code ? I am new to VBA and MS ACCESS. Any help would be greatly appreciated.Thanks!

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 14
    You can use the DoCmd.CopyObject method of the Application object. See: CopyObject Method [Access 2003 VBA Language Reference]
    Have a nice day!

  3. #3
    Join Date
    Jan 2012
    But the DoCmd.CopyObject doesn't allow you to copy a table from another database. It allows you to copy a table TO another database.

    Any chance of receiving assistance about doing it the other way round? (from another database TO the current database).

  4. #4
    Join Date
    Sep 2006
    Surrey, UK
    Provided Answers: 2
    How about the TransferTable command? It's been a while since I used it, but it might do the trick.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

  5. #5
    Join Date
    Jan 2012
    Yes, I tried the transfer method and it works very well.

Posting Permissions

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