Adding characters to to fill in spaces in fixed number strings

  • Thread starter Thread starter Frommbo
  • Start date Start date
F

Frommbo

I have a field with numbers in a text format. What I'm
trying to do is add zeros to the front end of numbers
under a set string length. In other words, If the set
string length is 10, I want to add zeros to the left side
of all numbers that are less than 10 characters in length
to make it into a 10 character string. This would be to
make, for example, 1234567 into 0001234567.
 
Thank you Cheryl!

-----Original Message-----
Try:

Format([MyField], "0000000000")


hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Frommbo said:
I have a field with numbers in a text format. What I'm
trying to do is add zeros to the front end of numbers
under a set string length. In other words, If the set
string length is 10, I want to add zeros to the left side
of all numbers that are less than 10 characters in length
to make it into a 10 character string. This would be to
make, for example, 1234567 into 0001234567.


.
 
You're welcome and good luck with your project.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Frommbo said:
Thank you Cheryl!

-----Original Message-----
Try:

Format([MyField], "0000000000")


hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Frommbo said:
I have a field with numbers in a text format. What I'm
trying to do is add zeros to the front end of numbers
under a set string length. In other words, If the set
string length is 10, I want to add zeros to the left side
of all numbers that are less than 10 characters in length
to make it into a 10 character string. This would be to
make, for example, 1234567 into 0001234567.


.
 
Back
Top