Thanks for trying to explain this to me Larry but i think i'm getting
more confused and the problem is likely quite easy to fix....
first off have a subform in a form
The subform is a continuous subform
The field giving me problems in the subform is a TEXT field that the
user will sometimes put Text in and other times the form will be
updated with a Number.
The number is actually a volume calculation which usually ends up with
many decimal places. ie 100.123456789 etc.
I need to get this to show (in the subform) as 100.12 (format it to 2
decimal places in other words)
You have not said how you do the calculation.
Leave the Format property of this field blank. Since the field may contain
text or numbers, there is no Format setting that will help you!
Instead, in whatever calculation you're doing - and you still haven't said! -
convert the result to a Text value, e.g. set the field to
Format([Length]*[Width]*[Height], "#.00")
Obviously you will need to adapt this to whatever calculation you're actually
doing.
--
John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see alsohttp://
www.utteraccess.com
Hi John,
the calculation is done on a different form altogether.
fShpSpec is a form that the user updates to compare the actual weight
of a shipment with it's chargeable weight .
This form has a field [text260] with it's control set as follows:
=Sum([Lock Total Vol Wgt Kgs]), format = standard and decimal places
set to 3 (we need 3 decimals on this form)
As soon as the calculations are made on this form 'some ' of the data
is xfered to another table
these fields are transferred: [ref], [no of pcs], [gross wgt],[charge
wgt]
*note [charge wgt] is actually CHARGEABLE WEIGHT (which is the higher
of the two values - actual weight of the shipment and the volume
weight of the shipment)
to complicate things even more the [gross wgt] field is a number field
and the [charge wgt] field is a text field. This is because sometime
we need a number in this field and other times we need to overwrite
the number and insert the word "as agree" or other text.
So when the [charge wgt] number gets pasted into this field it usually
is a number with many decimals in it. I need this field to take that
number and round it up to 2 decimals (again remember this is for
numbers only - for text i don't need any formatting done)
This form is then actually being used as a subform (but i don't think
this portion concerns this issue).
to get the volume weight of the shipment i have a field with the
control property set as follows: =(([Lock L]*[Lock W]*[Lock H])*[Lock
QTY])/IIf([Combo229]="CM",6000,366)
(if we format the number to 2 decimals at this stage - it will not
serve the purpose required on this form which needs the number
formated to 3 decimals. Remember there are two forms that need this
number - one = 2decimals the other = 3 decimals)
I hope this helps you understand better how the number is calculated
As you can see it's a bit complicated and i'm almost certain you are
going to suggest a much better way to approach this design but i am so
into this now that i really don't want to redesign how it all works
together. i really just need this darn text field to round up my
numbers to 2 digits.
It always surprises me how difficult something this simple can be.
I appreciate you being patient with me on this John
Steve