AutoNumber field....

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

Guest

Can I change the format of auto number to include leading characters; such
as, zeros or letters?
 
An autonumber field is used to provide a unique number in a record. It
should generally not be used for anything. If you need a number that will
be used (an invoice number, or a customer number) you should use one of the
often posted methods to locate the largest number in a table and add one to
it.

That being said, I think you could use the "format" function in a form or a
report to pad an auto-number with zeros. Try it and see.

Do a search for previous posts on this topic and you should find a ton of
posts.
Rick B
 
Ethan said:
Can I change the format of auto number to include leading characters;
such as, zeros or letters?

If the other characters are always the same (e.g. "STK-") then just use a format
string of...

"STK-0000"

....to display the number (23) as "STK-0023".

If they need to vary store them in an additional field in the table and then
combine them for display with an expression like...

=[PrefixField] & "-" & Format(AutoNumberField, "0000")
 
Back
Top