A format for decimal values that can specify the max number of decimals, but will remove trailing zeros
fformat(123.45, 2)
yields 123.45
fformat(123.45, 0)
yields 123
fformat(123, 2)
yields 123
fformat(123.4, 2)
yields 123.4
fformat(123.45, 2)
yields 123.45
fformat(123.456, 2)
yields 123.46
Make this available in textboxes, and grids
I ask for this because the vast majority of our parts are sold and used in whole qty’s, so nearly every where a qty is shown there are trailing zeros.
In some reports a do a check to see if there is a fractional part, and format accordingly.
iif(floor(value,0)<>value, format(value,"0"), format(value,"0.00")
It would be nice if the UI could do that