Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating temporary tables

Status
Not open for further replies.

GerryGoldberg

Technical User
Apr 12, 2001
55
Using VBA, how can I create a temporary table that I can fill using VBA code. I would like the table to be deleted when my form closes. I don't want my database to be updated to reflect this table so that the size of the database will not continue to grow as this table is created and then deleted.

Thanks,

Gerry Goldberg
 
You'd have to use an Array in order to do this without creating a table. That's the only way to avoid the increase in size over time. However not knowing how much data you are talking about, an array might not work too well depending upon the size of the array needed. I suggest you look up arrays in Access help to see if they will work for you.

HTH Joe Miller
joe.miller@flotech.net
 
If the size of your temporary data is too important for an array then I suggest that you create either a CSV file or a simple ASCII file (see Online Help: "OPEN").
By doing so there will be no database bloating at all, the performance is more than satisfying.
 
If you start the name of the table with a ~ then it will be seen as a temporary table by Access and deleted when you close the database (not the form). It will however result in the mdb growing until you compact the file. There is nothing you can do about that (with any table). However, unless your mdb is growing to the maximum allowable limit (1Gb for Access 97, 2Gb for Access 2000/2002), I wouldn't worry about it.

HTH,

Ed Metcalfe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top