northernstar
09-12-2007, 09:33 AM
hi everyone
i would like to format a label to a number of decimal places depending on the value of a textbox
decimalplaces is a textbox on a multipage form (page1)
corrected1 is a label on a multipage form (page2)
so when decimalplaces = 0
i would like corrected1 to be formatted to no decimal places (ie 1)
when decimalplaces = 1
and for corrected1 to one decimal places (ie 1.0)
etc
i have tried the following
private sub DecimalPlaces_Change()
if DecimalPlaces="1" then
Corrected1=Format(Corrected1,"0.0")
end if
i have tried the Format statement in other code and it works fine
any ideas
thanks
i would like to format a label to a number of decimal places depending on the value of a textbox
decimalplaces is a textbox on a multipage form (page1)
corrected1 is a label on a multipage form (page2)
so when decimalplaces = 0
i would like corrected1 to be formatted to no decimal places (ie 1)
when decimalplaces = 1
and for corrected1 to one decimal places (ie 1.0)
etc
i have tried the following
private sub DecimalPlaces_Change()
if DecimalPlaces="1" then
Corrected1=Format(Corrected1,"0.0")
end if
i have tried the Format statement in other code and it works fine
any ideas
thanks