Aligning number values

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I need to right justify amounts in a field with width of x digits. I have
tried Format(2.35, "##########0.00") but the numbers come out left
justified. Anyway to justify them on the right like the currency amounts
should be?

Thanks

Regards
 
The Format() function generates a string, and Access therefore treats it as
text.

Could you set the Format property of the text box instead of using the
Format() function? Not only would it align as a number, but you could
perform math on it (e.g. sum or average.)

If you want to treat it as text anyway, you could right-align the text box.
(Toolbar icon in design view.)

If you are trying to calculate the actual width on a report, see:
http://www.lebans.com/textwidth-height.htm
 
try format(Format(2.35, "##########0.00"),string(12,"@"))
to right justify in a 12-character field
 
Back
Top