Deleting objects using a *name* format (1 Viewer)

bheylman

New member
Local time
Today, 15:07
Joined
May 31, 2001
Messages
7
Does anyone know if there is a command that I can use to delete all tables that contain the string import_errors? Thansk - Bruce
 

glynch

Registered User.
Local time
Today, 10:07
Joined
Dec 20, 2001
Messages
128
Try something like:

For Each tblTable in dbCurrent.TableDefs
If tblTable.Name like "*import_errors"
tblTable.Name.Delete
End If
Next

This is close but the syntax might be off, it should get you close enough to use Help to get it right.

Good Luck, Gerry
 

Users who are viewing this thread

Top Bottom