
Convert decimals to whole numbers
Andrew,
If you just want to make this change on the report, and only if the value is
less than one, then this may help.
Have the value control on the report with visible = false, called say
txtValue.
Another control, that will actually display the result would then have a
Control Source of something like;
= IIF(txtValue<0,format(txtValue*1000,"000") & "g",Format(txtValue,"0.000")
& "kg")
I think this will give you the results you seek, but I have not checked it
(or the syntax).
--
Hope This Helps,
Jeff Davies
Quote:
> I have a textbox called text0 on a form called FRMmanlabs. the decimal
> places is set too 3 and the format is set to fixed.
> When I run the report to I need to be able to change the following.
> If the user enters a value of less than 1 in the text0 textbox I want to
> convert the number from a decimal to a whole number. The textbox on the
> report is called tare and the report is called rptmanlabs.
> I know this sounds strange, what i want to do but i need to convert from
> parts of a kilo into grams.
> Could anybody help me with the code required to do this??
> Thanks in advance
> Andy Ingall