Private Function createtable() As Boolean
Dim qdf As DAO.QueryDef
Dim db As DAO.Database
Dim strSQL As String
strSQL = "CREATE TABLE tblsystem ("
strSQL = strSQL& " Name Text (255) , "
strSQL = strSQL& "Container Text (50), "
strSQL = strSQL& "DataCreatedDateTime , "
strSQL = strSQL& "LastUpdatedDateTime,"
strSQL = strSQL& "Owner Text (50) ,"
strSQL = strSQL& " ID Autoincrement Constraint PrimaryKey PRIMARY KEY)"
On Error GoToErr_Handler
Set db = CurrentDb
With db
.Execute "DROP TABLE tblsystem"
.Execute strSQL
.TableDefs.Refresh
End With
createtable = True
ExitFunction:
Exit Function
Err_Handler:
Select Case Err
Case 3376, 3011
Resume Next
Case Else
createtable = False
End Select
Resume ExitFunction
End Function