Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Table in Access with an AutoNumber Field

Status
Not open for further replies.

Catrina

Programmer
Feb 11, 2000
70
US
I want to create a table with an AutoNumber Field, but I can not find information on the syntax. Is it possible?

Thanks in advance for any help.

Catrina
Here is my statement as is:


db.Execute "CREATE TABLE RateRec ([RREmp] TEXT(6), " _
& "[RRSeq] TEXT (1), " _
& "[RateDate] TEXT (8), RateRate LONG, " _
& "RecordID )"

RecordID is the field I need set as AutoNumber







 
Dear Catrina

You can do it in one of two ways:

1. Use COUNTER as the data type OR
2. Use AUTOINCREMENT(seed, increment) as data type where you have more liberty. I hope this helps.

Regards

Irfan Ahmed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top