Is there a line of code i could use to check if a table exists (so that i can delete it if it does)
im thinking
If table1 = true then
etc
thanks
Dan
im thinking
If table1 = true then
etc
thanks
Dan
Dim tdf As DAO.TableDef
Dim blnTableExists As Boolean
Dim strTableName As String
blnTableExists = False 'Initialize to False
strTableName = "<Your Table Name Here>"
For Each tdf In CurrentDb.TableDefs
If tdf.Name = strTableName Then
blnTableExists = True
Exit For
End If
Next
If blnTableExists Then
MsgBox "The [" & strTableName & "] Table exists in Current Database"
Else
MsgBox "The [" & strTableName & "] Table does not exist in Current Database"
End If
Comment