Function IsTable(tblName As String) As Boolean
' returns true if there is a table called tblName
Dim db As Database
Dim tdf As TableDef
Set db = CurrentDb
For Each tdf In db.TableDefs
IsTable = (tdf.Name = tblName)
If IsTable Then Exit Function
Next
End Function
Sub DeleteMyTable()
If IsTable("MyTable") Then
DoCmd.DeleteObject acTable, "MyTable"
End If
End Sub