How to create an AutoNumber field value in Access?

前端 未结 4 841
不知归路
不知归路 2020-12-17 01:57

I\'m trying the following:

CREATE TABLE Table1
(
    RecordNo autonumber, --error here!
    PersonId varchar(50),
    ...
)

But, there is a

4条回答
  •  -上瘾入骨i
    2020-12-17 02:09

    Method 1:

    1. Open table in design view
    2. Make a field named "ID" or whatever the field will be that will have the Auto Increment
    3. Put "AutoNumber" under DataType

    Method 2:

    1. Make a new table
    2. Close the table and save it
    3. When it asks if you want a primary key click ok
    4. Open the table in Design View
    5. Edit the new field to whatever name you like

提交回复
热议问题