autonumber alternative

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to create an automatic unique identifyer for my forms in the format
AAA-000. I have found that the autoformat datatype cannot have formats apart
from long integer and replecation ID. I have also tried changing data type to
number and inserting - "AAA"-000 - in format. This appears ok but does not
automatically increment like autonumber does when a new record is created.

Any ideas or not possible

Thanks
 
If this is a number that has some meaning and needs to be incremented, then
you will have to create code to do so in your data entry form.

Do a search, this is asked and answered all the time in the forms,
formscoding, or tabledesign newsgroups.
 
I want to create an automatic unique identifyer for my forms in the format
AAA-000. I have found that the autoformat datatype cannot have formats apart
from long integer and replecation ID. I have also tried changing data type to
number and inserting - "AAA"-000 - in format. This appears ok but does not
automatically increment like autonumber does when a new record is created.

Any ideas or not possible

Thanks

Don't confuse the *datatype* of a field - GUID or Long Integer - with
its *format*. You can indeed set the Format property (which is on a
different line in the field properties) to

"AAA-"000

As noted elsethread, however, it is best to avoid using an Autonumber
for any application where the value of the number is meaningful.
Autonumbers will *ALWAYS* have gaps; not only from deleted records,
but if a user hits the Escape key after starting a new record that
autonumber will be used up and skipped.

One concern: are you quite certain that you will never, ever have 1000
records in the table?

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

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


Back
Top