Right Justify Numbers

  • Thread starter Thread starter Lester
  • Start date Start date
L

Lester

Thanks Rob for the help.

I understood what you said about using the Len function,
but if you have a number such as 1 and 200,000 will Access
assign the same lenght of characters for both values?
 
No, not by default. From Access Debug window:

?Len(CStr(1))
1
?Len(CStr(200000))
6

If you want to display them using the same number of digit, you can use the
Format() function to do so.

?Format(1,"000000")
000,001

?Format(200000, "000,000")
200,000
 
Back
Top