Deleting temporary tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I’m using some code to create a table temporarily while some code executes
on a form, in order to store some information. I want the table to be deleted
again after the code executes.

I’m using the DAO CreateTableDef method to create the table definition, and
the OpenRecordset method to gain access to its data (to add and edit records).

In order to delete it, should I delete it from the TableDefs collection
using CurrentDb.TableDefs.Delete, or should I use DoCmd.DeleteObject? Or do
both of these do exactly the same thing?

Thanks again

David
 
David,

I believe they do the same. However, if the table structure is always
the same, I would suggest you create it once and just append / delete
records, rather than what you are doing, which will make it more
efficient and result in less database bloat.

HTH,
Nikos
 
Back
Top