I'm not sure how (or if it's possible) to capture the strange names that MS
gives these, but if you use a decent naming convention, you may be able to
'reverse program' the procedure...
Assuming "tbl" prefix for reg tables, "jtbl" for junctions, "ttmp" for temp
tables, and "ltbl" for Local tables, something like this piece of complete
aircode may get you started...
Dim td As TableDef, strTable As String
For Each td In TableDefs
strTable = td.Name
If (Left(strTable, 3) <> "tbl") AND _
(Left(strTable, 4) <> "jtbl") AND _
(Left(strTable, 4) <> "MSys") AND _
(Left(strTable, 4) <> "USys") AND _
(Left(strTable, 4) <> "ttmp") AND _
(Left(strTable, 4) <> "ltbl") Then
td.Delete (?)
End If
Next
CAREFULLY!!!! :-)
hth
--
Jack Leach
www.tristatemachine.com
"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
"Cathy" wrote:
> Is there a way to delete a series of import error tables programatically? I
> am pulling in unformatted data from Excel, which causes many import error
> tables... The data is good, just not formatted to directly load into a table.
> I would like to regularly programatically delete these import error tables,
> otherwise they just continue to accumulate.
>
> Thank you,