Zero fill Text field

  • Thread starter Thread starter Les
  • Start date Start date
L

Les

I have a need to change a numeric field to a text field.
With this in mind I need to zero fill the left side of the
field.

Is there any easy suggestions?
 
I have a need to change a numeric field to a text field.
With this in mind I need to zero fill the left side of the
field.

Is there any easy suggestions?

Back up your database first, as always before making design changes!

If you want the field to be 8 bytes long, I'd suggest creating an
(empty) text field in your table; then run an Update query updating
the new field to

Format([numberfield], "00000000")

For other lengths use more or fewer zeros as appropriate.

You can then check the result, carefully, and delete the numeric
field.
 
Back
Top