'**************Functions used to erase tables*****************Start
Function EraseTable(strTableName As String)
'Delete the table pased into the function
If blnCheckTable(strTableName) = True Then DoCmd.DeleteObject acTable, strTableName
End Function
Function blnCheckTable(strTableName As String) As Boolean
'check to ensure the table name exists in the table definitions
'if any error occurs then check table = false
On Error GoTo subexit:
If CurrentDb.TableDefs(strTableName).Name = strTableName Then
blnCheckTable = True
End If
subexit:
End Function
'**************Functions used to erase tables*****************End
|