Zeros at the beginning of a number in a number field

I

Iram

How do I get a field in a table to hold zeros before the number, example
083121555-01
I have tried double, single, integer and non hold the 0 at the beginning.

Can you help?


Iram/mcp
 
K

KARL DEWEY

Number do not have leading zeros. You need a text field.
Another thing, number cannot have a dash in it.
 
D

Douglas J. Steele

Your example isn't a number: a numeric field can't have a minus side in it.

The answer is use a text field, not a numeric one.
 
E

Evi

You can make a number field 'look' as if it has leading 0s, eg to generate
invoice numbers. Use the Format section in Table Design or in the Format
Properties of a form or report text box and type in eg
0000
Your field will then always have at least 4 digits - the leading ones being
0s if the number isn't high enough, but the number will otherwise act
exactly like a number.
Please ask if this is unclear

Evi
 
J

Jeff Boyce

As Karl and Doug point out, "numbers" have neither minus signs nor leading
zeros.

Given the pattern provided by the original poster, it is unlikely that what
was called a "number" is, in fact, something that you'd need to be able to
add/subtract/multiply/divide. If you don't need to "do math" on it, it
isn't a number.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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