Autonumber values (1 Viewer)

saintsman

Registered User.
Local time
Today, 20:27
Joined
Oct 12, 2001
Messages
138
Very simply, can you get an autonumber to start from zero instead of one?
 

saintsman

Registered User.
Local time
Today, 20:27
Joined
Oct 12, 2001
Messages
138
Yes it does work. You just have to set your number to minus 1 before you run the append query.

Thankyou.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 14:27
Joined
Feb 28, 2001
Messages
27,241
Beware!

When you want a certain value for an autonumber, there is a glaring implication that needs to be addressed. For the field that contains this autonumber, does it have some other meaning than just "unique record number for record in this table" ???

If the answer is yes, you don't want an autonumber in that position anyway. Autonumbers cannot have meaning outside of their uniqueness within a table. Remember, autonumbers in a shared database can be skipped every time someone begins to enter a new record but then changes their mind and retracts or cancels the update.

If the number has a meaning, you need to write some code to enforce the integrity of that meaning. You CANNOT trust Access to do what you want it to without such guidance.
 

Users who are viewing this thread

Top Bottom