Can I customize an auto number in access?

G

Guest

I am trying to format a number in access using auto numbering. the default
is for a single number. I want to customize it to read ie; 0001 and so on
 
R

Rick Brandt

FrankG said:
I am trying to format a number in access using auto numbering. the
default is for a single number. I want to customize it to read ie;
0001 and so on

First warning: AutoNumbers are intended ONLY to provide a unique value per
record which can be used as the Primary Key and/or as a field to relate to other
tables. They will not provide a perfectly incremental, gapless set of numbers
as there are many perfectly normal processes that will cause gaps in the
sequence. If you have problems with that, then don't use an AutoNumber.

Now...whether you use an AutoNumber or roll your own scheme for assigning the
numbers you can simply use a format property setting for controls on Reports and
Forms of "0000" to provide the display you desire. The leading zeros will not
be *stored*, but they will be *displayed*. If for some reason you want them
stored, then you must use a Text field instead of a numeric field.
 

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