Sandra Smith
asked on
ACCESS 2010 Create Table VBAstatement keeps giving a syntax error
I have the below and it sure seems OK to me, but it does not work!
Public Sub TestCode()
On Error GoTo ErrorHandler
CurrentDb.Execute "CREATE TABLE hldIntegerValueModelSS RecNumber INTEGER, IntegerValue INTEGER "
Exit_ErrorHandler:
Exit Sub
ErrorHandler:
MsgBox "Error Number: " & Err.Number & " Description: " & Err.Description
Resume Exit_ErrorHandler
End Sub
Public Sub TestCode()
On Error GoTo ErrorHandler
CurrentDb.Execute "CREATE TABLE hldIntegerValueModelSS RecNumber INTEGER, IntegerValue INTEGER "
Exit_ErrorHandler:
Exit Sub
ErrorHandler:
MsgBox "Error Number: " & Err.Number & " Description: " & Err.Description
Resume Exit_ErrorHandler
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you need to enclose the fields in ()
ASKER
Totally missed that, thank you.
Sandra
Sandra
ASKER
Going to ask another question as the first field needs to be an auto number, fyi.