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")

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

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
 
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.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
 

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