Auto number question

A

Anglo Stores

I'm sure this question has been asked many times before.I have a table with
a primary key field,
(auto number,long integer),incrementing 1,2,3, etc.
Is it at all possible to change this to read 10001,10002,10003 etc?
Thanks in advance,

Gordon
 
R

Rebecca Riordan

Gordon,

You can do it in a query by calculating the value in a field expression, but
the general rule is that if you care what the value is, you shouldn't use an
autonumber. There are examples on www.mvps.org/msaccess of how to generate
the numbers you want through a form.

HTH

--
Rebecca Riordan, MVP

Designing Relational Database Systems
Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step

http://www.microsoft.com/mspress

Blessed are they who can laugh at themselves,
for they shall never cease to be amused...
 
S

Sal Rosario

Once the numbers are there, you will need to play several tricks to change
them. Let's see what the experts say. But if you just created the table you
can have it start at 10001. Just create an "Update Query" to update the
autonumber field to 10000. Then you can open your table and delete that
number. Once you start putting in records, the next one will be 10001.

Sal
www.cedrostec.com
 
S

Sal Rosario

Let me correct myself:
- You need to create another table with at least one field. This should have
the same name as your autonumber field in the existing table and should be
of type number. Then type 10000 in the first record.

After this. Create an Append query that will append this record to your
existing table. You can delete that record afterwards if you wish.

The next number in that table will be 100001. I hope it is not too
confusing.

Sal
www.cedrostec.com
 

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