Adding Leading zeros

  • Thread starter Thread starter Nat
  • Start date Start date
N

Nat

How do you add leading zeros to certain cells via an
update query? I found this recommendation Right
([original_num]+1000000,6), however, when I run the update
query it only keeps the original_num values and does not
add any leading zeros.
 
Nat said:
How do you add leading zeros to certain cells via an
update query? I found this recommendation Right
([original_num]+1000000,6), however, when I run the update
query it only keeps the original_num values and does not
add any leading zeros.

You can only *store* leading zeros in a text field. Sounds like you are
using a number field.

You can *display* leading zeros using the format property. I have never
seen a case in any of my apps where this was not sufficient.
 
If you are working with a field who's DataType is set to Number, an update
query will do you no good. Change the Format property of the field to
00000.000 or however you want it to display. This doesn't change the values
that are stored, it just changes how they are displayed.

The update query you describe would only work on the characters in a field
who's DataType is set to Text.

Number fields won't store leading zeros (although you can force them to be
displayed). Text fields will store leading zeros.

Hope this helps,
 
Back
Top