Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding Problem

Status
Not open for further replies.

kcmark

Technical User
Nov 2, 2002
63
US
Ok - I am sure this is a simple question, but I cannot figure it out. I have an expression that multiplies 2 fields together in a query. How can I get it to round the result to 2 decimal places. I can change the format to Currency with 2 DP, but it still saves the calculation with multiple decimal places - I need it to round and truncate the result after 2 decimal places. In Excel it is as easy as Round(field,2) - is there a similar function in Access?
 
Hi,

Yes! In the query grid, right click on the expression and open the expression wizard. In there is a list of functions, including ROUND.

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
I have been through all the functions, but did not find the Round function. There is a Rnd()- but it is for random numbers. I tried to use the following command in the query grid expression. It accepts the logic, but is still saving the result with multiple decimal places:

Pmt_Amount:Round([Amount]*[Rep_Rate_1],2)

Any ideas?
 
If there's no ROUND function then would this work?
[tt]
Pmt_Amount:INT([Amount]*[Rep_Rate_1]*100)/100
[/tt]


Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top