Zeros at the beginning of a number in a number field

  • Thread starter Thread starter Iram
  • Start date Start date
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
 
Number do not have leading zeros. You need a text field.
Another thing, number cannot have a dash in it.
 
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.
 
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
 
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
 
Back
Top