Adding Leading Zeroes to Text

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
 
V

Van T. Dinh

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top