Link to home
Start Free TrialLog in
Avatar of Sandra Smith
Sandra SmithFlag for United States of America

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
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you need to enclose the fields in ()
Avatar of Sandra Smith

ASKER

Totally missed that, thank you.

Sandra
Going to ask another question as the first field needs to be an auto number, fyi.