dynamic decimal places

mikmyro

New member
Local time
Today, 04:53
Joined
Apr 30, 2012
Messages
7
I have a subform that displays doubles in a textbox as fixed with 4 decimal places as default. I have been trying to change the number of decimal places based on the value in a textbox on the main form.

I have tried this:
Code:
Forms![Main Form]![Holder_subform].Form![Final PCT].[DecimalPlaces] = CByte(Forms![Main Form].Numdecs)
where [Final PCT] is the textbox on the subform containing the decimal number and Numdecs is the textbox on the main form containing the number of decimals I want to use.
I want to implement this Form_Current sub.
:banghead:
If someone could point me in the right direction I'd be grateful.
 
Just a guess, if you are on the subform,
then perhaps
Round(Me.[Final PCT],Me.Parent.NumDecs)
 
Thank you jdraw.
That did work but I still wonder how I get around the cosmetics of still having four decimal places, the last place now being zero without actually changing the Decimal Places property under a Fixed format.
 

Users who are viewing this thread

Back
Top Bottom