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

asked on

On ACCESS 2010 VBA Create Table statement, need to be sure first filed is autonumber.

The below creates the table, but how to I make sure the first field is autonumber?

CurrentDb.Execute "CREATE TABLE hldIntegerValueModelSS (RecNumber INTEGER, IntegerValue INTEGER)"
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
Avatar of Kanti Prasad
Kanti Prasad

Hi

CurrentDb.Execute "(CREATE TABLE hldIntegerValueModelSS ([ID] AUTOINCREMENT, [RecNumber] INTEGER, [IntegerValue] INTEGER)"
Avatar of Sandra Smith

ASKER

Did the job the simplest.
you can also use "autoincrement"

CurrentDb.Execute "CREATE TABLE hldIntegerValueModelSS (RecNumber autoincrement, IntegerValue INTEGER)"