Display leading zero and suppress trailing zero

D

Diana

Question: How to format a text box in a report to display leading zero for
numbers less than 1 (eg, 0.1) and to suppress trailing zero and decimal point
for numbers greater than 1 (eg, 22 not 22.)? Access 97

Report contains text box named [calculated number], whose values ranges from
X.X to XX (positive numbers).
[calculated number] = [number]*0.1/2.
[number] is supplied by the end-user via a form.
[number]'s format = fixed with 1 decimal place.

I currently have the [calculated number]'s format = 0.# which works fine for
numbers less than one but not for numbers greater than one (displays 22.
instead of 22). I have searched the Help Topic for MS Access 97 and also
have searched office online and am unable to figure out a solution thus far.

What is the best approach to my question? Any direction is much appreciated.
 
Top