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!

Deleting Temp Tables

Status
Not open for further replies.

NCYankee1

Programmer
Mar 27, 2001
66
US
I have an Access 97 system that builds a lot of temp tables through queries in the system. Is there a way I can run a routine to identify which temp tables are there and to delete these tables? All of my temp tables begin with "TEMP".

Thanks!
 
Yes, something like this...

Dim tbls as Tabledefs
Dim tbl as Tabledef

For each tbl in Tbls
if tbl.Name like "Temp*" then
tbls.delete tbl.name
end if
Next tbl
tbls.refresh

Obviously, you will need to debug and adapt this to your code. Hope that helps.

Gary
gwinn7
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top