Create a new database with VBA

  • Thread starter Thread starter felixc36
  • Start date Start date
F

felixc36

Hi,

I have an Access 97 database and at the end of a process I want to export some
tables to new database.

What I want to do is first create a new database and then copy some tables to
this new database.

When i tried to export a table with the transferdatabase method i got an error
message since the database is not existant at the time of the transfer. So I
presume I must create a database first. Then copy the tables and queries
after.

Is this possible with Access 97?

Thank tou in advance.

Felix.
 
I have an Access 97 database and at the end of a process I want to export some
tables to new database.

What I want to do is first create a new database and then copy some tables to
this new database.

When i tried to export a table with the transferdatabase method i got an error
message since the database is not existant at the time of the transfer. So I
presume I must create a database first. Then copy the tables and queries
after.

Is this possible with Access 97?


Check Help for the CreateDatabase and CopyObject methods.
 
Hi,

I have an Access 97 database and at the end of a process I want to export some
tables to new database.

What I want to do is first create a new database and then copy some tables to
this new database.

When i tried to export a table with the transferdatabase method i got an error
message since the database is not existant at the time of the transfer. So I
presume I must create a database first. Then copy the tables and queries
after.

Is this possible with Access 97?

Yes; see the VBA help for the CreateDatabase method of the Application
object.

John W. Vinson[MVP]
 
Back
Top