Quote:
Originally Posted by jkwok
Hi,
I have a make-table query with one attribute that is derrived from multiplying a number against currency value.
For example:
Hours Worked * Rate = Expense
95.516 * $55.54 = 5305.0446044
How can I control the decimal places so that I end up with this?
95.516 * $55.54 = $5305.04
I've tried editing the field properties in the query design window to change the result to currency but that didn't work. Should I have an input mask?
Thanks,
Jason
I see two obvious possibilities - Someone who knows more than me can probably suggest more (or better ones) *grin*:
1) Control the result at calculation time with a round statement. E.g. Expense = Round(Hours Worked * Rate, 2). This would store the result with 2 decimals.
2) Keep the data stored with more precision, but display the result formatted. E.g. <Output> = Format(Expenses, "0.00")
Both examples above are more pseudo-code than real VBA - You should check the help in your version of MS Access to see the options and true syntax.