Right Justify Numbers

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?
 
V

Van T. Dinh

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
 

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

Top