Autonumber

  • Thread starter Thread starter Ruth
  • Start date Start date
R

Ruth

Hi,there
I have a product type table in which there are TYPEID and
TYPEDESC two fields.I use autonumber for TYPEID but I
found if I deleted one record e.g. record 3,next will
start from 4 although I hope it uses 3 as TYPEID. How can
I do it? Any help will be appreciated.
 
Hi,there
I have a product type table in which there are TYPEID and
TYPEDESC two fields.I use autonumber for TYPEID but I
found if I deleted one record e.g. record 3,next will
start from 4 although I hope it uses 3 as TYPEID. How can
I do it? Any help will be appreciated.

This is exactly how Autonumbers are designed to work.

An autonumber has one purpose, and one purpose only: to provide a
unique, nonrepeating key. Autonumber fields will always have gaps.

Just don't expose the autonumber to the user's view. The ID is
completely arbitrary; if all the user sees is a combo box with the
TypeDesc field (and all the computer sees is the hidden numeric ID),
both the user and the computer will get along just fine.
 
Back
Top