Rounding problem

CEH

Curtis
Local time
Yesterday, 21:39
Joined
Oct 22, 2004
Messages
1,187
Have a little problem that I can't seem to correct. In a subform that calculates "items" ordered by multiplying by "Quantity" my "Total" is not rounding correctly... I have went thru the DB and checked all number fields to make sure they were set to Single or double.... But the total draws from a calculation in a query... How can I set this to "Double" and make the calculation return the correct result??
 
Right click on the calculated field in the query and in properties, set correct format
 
You cannot set it as Double or single from there. Only the format. If Standard, fixed... currency ..... doesn't matter, makes no change.
 
How about using the Cdbl() function?
 
Thanks Cosmos, that led me to do this...... seems to work as field in query
Price: Format(CDbl([ItemPrice]+[UnitCost]*[ItemMarkup]),"Fixed")
 
Thanks Cosmos, that led me to do this...... seems to work as field in query
Price: Format(CDbl([ItemPrice]+[UnitCost]*[ItemMarkup]),"Fixed")

I have similar problem . Is this correct code Like Format(CDbl.....), "Fixed). It is not working for me.

Any help please
 
Well if that is the code you left out the last parenthesis after "fixed" Check your syntax, or post your exact code.
 
Hi CEH,

Thank you for the tip. It is working now. My code is

=" 1 " & Format(CDbl([Price1]),"Fixed") & " 2 " & Format(CDbl([Price2]),"Fixed")
 
Hi CEH,

Thank you. It is working now. My code is:

=" 1 " & Format(CDbl([Price1]),"Fixed") & " 2 " & Format(CDbl([Price2]),"Fixed")
It will give output like:

1 69.10 2 65.34
 
I said parenthesis and meant quote...well, you got the idea! Glad it's working for you.
 

Users who are viewing this thread

Back
Top Bottom