Adding Leading Zeroes to Text

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I am creating a text file and need to add leading zeroes
to a text field in a querie or table.

I have a column called County. Some of the names are
longer than others but I need to have this field be 20
characters in length and fill the rest with leading zeroes.

Any help is appreciated.

-Chris
 
Don't store it in the Table. In the Query, add a calculated Column:
ZerosPadded: Right(String(20, "0") & [Country], 20)

should pad your Field values to 20 characters with leading "0"s.
 
Back
Top