Export selected tables from old Access Database to new Access Database

  • Thread starter Thread starter learning_codes
  • Start date Start date
L

learning_codes

Hi ,

I'm wondering if there is a way for me to export some tables including
data and structure from old database to a new database and then save as
new database name.

I try to create a marco and it create a new table within the same
database.

I would be appreciated if you can help me to create a code for one
button on the form screen that will export selected tables to a new
database and then save as a new database name file.

Thanks ;-)
 
Hi ,

I'm wondering if there is a way for me to export some tables including
data and structure from old database to a new database and then save as
new database name.
I try to create a marco and it create a new table within the same
database.

Macros aren't involved in this process.
I would be appreciated if you can help me to create a code for one
button on the form screen that will export selected tables to a new
database and then save as a new database name file.

You'll need to use the CreateDatabase() method in VBA (AFAIK you can't
do it from a Macro), and then the TransferDatabase method to migrate
the tables.

I'm not sure *why* you want to do this! Having two separate .mdb files
containing the same data seems redundant, awfully complex, and also
redundant. What's the purpose of this exercise?

John W. Vinson[MVP]
 
Back
Top