Sub Delete_Table()
Dim cat As ADOX.Catalog
On Error GoTo ErrorHandler
Set cat = New ADOX.Catalog
cat.ActiveConnection = CurrentProject.Connection
cat.Tables.Delete "java2sTable"
Set cat = Nothing
Exit Sub
ErrorHandler:
MsgBox "Table '" & "tblFilters" & _
"' cannot be deleted " & vbCrLf & _
"because it does not exist."
Resume Next
End Sub
|