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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding question again? 1

Status
Not open for further replies.

jlnewbie

Technical User
Aug 9, 2000
69
0
0
I have a query calculation that formatted to return the value to the nearest 0.
Ex. 2343 = 2340 using KMITCH's idea which perfectly.
Format([FieldToRound]/100,"0.0")*100

I would like the second query that take the average of these numbers to be formatted the same way (i.e. to the nearest 0). But i can't seem to format using this method because it is not a calculated field. Right now the average between both numbers come like this 2340 and 2330 , Average = 2335.

Thanks
[sig]<p>JLopez<br><a href=mailto:Lopez31@ATC-Enviro.com>Lopez31@ATC-Enviro.com</a><br>Environmental Services @ Your Service[/sig]
 
Use a third query to round the average in your second query - e.g. Format([AvgOfFieldToAve]/100,&quot;0.0&quot;)*100

where AvgOfFieldToRound is the field in your second query that holds the average
[sig]<p>Keith C Taylor<br><a href=mailto:TekTips@kctaylor.co.uk>TekTips@kctaylor.co.uk</a><br><a href= Information Gardener</a><br>The C stands for Computer![/sig]
 
Thanks Keith:
Thats precisely what I decided to do. Another way which hit me later was to use the raw (unformatted) data), query that for an average and since this is a calculated field I can format it using the expression. It just might take an extra query. But now I have both values

Thanks
[sig]<p>JLopez<br><a href=mailto:Lopez31@ATC-Enviro.com>Lopez31@ATC-Enviro.com</a><br>Environmental Services @ Your Service[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top