Temporary database

  • Thread starter Thread starter Daniel Magnus Bennét Björck
  • Start date Start date
D

Daniel Magnus Bennét Björck

Hi!

In order to reduce the size of my Access 97 database, I want to create a
second database through VBA to keep temporary data, which I can then delete
after I'm done.

How do I do that?

Brgds

Danny
 
Daniel said:
In order to reduce the size of my Access 97 database, I want to create a
second database through VBA to keep temporary data, which I can then delete
after I'm done.


You can use the CreateDatabase method to create an mdb file.
Depending on what you're doing, an alternative you might
want to consider is keeping a "template" mdb file with any
needed tables (empty) already in it and using FileCopy to
create a working copy.

There are a several ways to create tables on the fly, DAO
CreateTableDef, executing an SQL DDL Create Table,
statement, executing an SQL Swlwct Into statement,
TransferText, etc.

There's an article on this subject at
http://www.granite.ab.ca/access/temptables.htm
 
Back
Top