Keep leading zeros in a numeric field

  • Thread starter Thread starter Curt Gardiner
  • Start date Start date
C

Curt Gardiner

Is there any way to stop Access from removing the leading
zeros in a numeric field as you are entering data in a
Table. ie. enter 000123 and Access stores 123
 
Only if you change the field type to Text.

If you want to keep the field as numeric, then don't worry about the "loss"
of leading zeroes, as you can always use the Format command to display the
number with the leading zeroes:

Format([NumberField], "000000")

And there are other variations on this theme that will produce similar
results.
 
Curt

To extend Ken's response, "why"? As in, "why do you need to preserve the
leading zeros?" I'm asking about the underlying business need.

Good luck

Jeff Boyce
<Access MVP>
 
Back
Top