autonumber question

  • Thread starter Thread starter JohnE
  • Start date Start date
J

JohnE

This is a general question regarding the autonumber. Is
it possible to customize the autonumber to say:
1) have is start at a different number?
2) have it include letters
I ask because it was asked if there could be some
automatic custom numbering done for the records. My
first thought is there is no control over the autonumber.
Is there a way to alter the autonumber?
Thanks.
*** John
 
JohnE said:
This is a general question regarding the autonumber. Is
it possible to customize the autonumber to say:
1) have is start at a different number?
Yes.

2) have it include letters
No.

I ask because it was asked if there could be some
automatic custom numbering done for the records. My
first thought is there is no control over the autonumber.
Is there a way to alter the autonumber?
Thanks.

Although it is possible to set the initial value for an autonumber, you have
very little control over it and it will not, as a rule, behave the way you
want. The common solution is to use your own procedure for generating a
custom number. If you're working in a single-user database, this can be as
simple as looking in the table to find the last number that was used so far,
then adding 1 to it for the next record. If you're working in a multiuser
database, one commonly has a one-record table in which you store the "next
free number". Then your custom-autonumber routine opens a recordset on that
table, locking it in the process, gets the number for use, then increments
the "next number" and saves it back to the table, freeing the table again.
 

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

Similar Threads

Access 2010 query for 3 tables 0
autonumbers 3
autonumber queestion 3
Add autonumber to a large table? 0
Autonumbering Query 1
Autonumber 2
Autonumber Field 3
Autonumber Drastic Increase 4

Back
Top