Zero filling a number field

P

pdlginternet

I have an auto number field that I want to zero fill to six digits but
can't figure out how. Any ideas?
 
L

Linq Adams via AccessMonster.com

You don''t say where you're trying to do this, but basically

Format(YourAutoNumber, "000000")
 
K

Klatuu

You can't do that with an Autonumber field and should not. Autonumber fields
should only be used to create unique keys in a table and for joining related
tables.

Also, numeric fields to not carry any leading digits. The only carry the
number. If you need to present it in output with leading zeros, you need to
use the Format function.
 
L

Linq Adams via AccessMonster.com

You correct, you can't do it as I said. Sorry! But you can format an
autonumber, at least in ACC2003! You have to do it either in table design
view or in the control's property box. You simply enter six zeros!

Having said that, I agree that Autonumbers should never see the light of day!
As John Vinson says, they're unfit for human consumption! Auto-incrementing
numbers should be used for such things as account numbers, ID numbers, stc.
 
Top