Autonumbering

C

chambers

Hi there. Question. I am attempting to set up a Purchase Order type system
using Access. I would like to change the beginning PO # to something other
than 1. I have used the help function and followed it's instructions to
change the beginning increment of the autonumber and cannot for the life of
me get it to work. Does anyone have any easy to follow procedures to making
this happen?

Thanks
 
R

Rick Brandt

chambers said:
Hi there. Question. I am attempting to set up a Purchase Order type
system using Access. I would like to change the beginning PO # to
something other than 1. I have used the help function and followed
it's instructions to change the beginning increment of the autonumber
and cannot for the life of me get it to work. Does anyone have any
easy to follow procedures to making this happen?

Thanks

I would first warn that an AutoNumber is not a good choice for a PO number as
they WILL develop gaps (sometimes very large ones) during normal use. Microsoft
only assures *uniqueness* from an AutoNumber. In accounting situations there is
often a requirement to account for all numbers (no gaps). If that is not a
problem for you...

Create an append query to insert a single record that has a value for the AN
field that is one smaller that what you want to use as a starting point. After
running the query delete that record. DO NOT compact the database until at
least one real record is added or the AN sequence will be reset back to one.
 
R

RuralGuy

Hi there. Question. I am attempting to set up a Purchase Order type
system using Access. I would like to change the beginning PO # to
something other than 1. I have used the help function and followed
it's instructions to change the beginning increment of the autonumber
and cannot for the life of me get it to work. Does anyone have any
easy to follow procedures to making this happen?

Thanks

You should read this link:

http://www.mvps.org/access/general/gen0025.htm
General: Use Autonumbers properly

And if that does not convince you to not use an autonumber then

http://www.mvps.org/access/tables/tbl0005.htm
Tables: Have Autonumber field start from a value different from 1

HTH
 
R

Rick Brandt

chambers said:
Why does it create Gaps? Is there anyway to prevent this from
happening?

Start a record and then press <escape> to cancel. That AutoNumber value is
gone. Run an append query and cancel at the "you are about to insert 5000 rows"
message. All 5000 of those numbers are gone. There are other reasons and no,
there is no way to stop this behavior except to NOT use an AutoNumber.

If you Google on "Custom AutoNumber Sequence group:*Access*" you will get lots
of information on how to automatically number your records without using
AutoNumber.
 
C

chambers

Thanks for the links. I would never have know it would do this until it was
too late. Thanks for the update guys!
 
V

Van T. Dinh

If you don't want gaps, do NOT use AutoNumber Field. In fact, AutoNumber
Field values will become random or even negative if you need to use
replication.

The only purpose of an AutoNumber Field is to provide uniqueness to each
Record in the Table and there should be no meaning attached to it. In fact,
I use AutoNumber Field in most of my Tables but my users don't see the
values of the AutoNumber Fields.

--
HTH
Van T. Dinh
MVP (Access)
 
R

RuralGuy

Thanks for the links. I would never have know it would do this until
it was too late. Thanks for the update guys!

You're welcome from all of us. That is what these News Groups are for!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top