rounding

vmorgan

New member
Local time
Today, 00:21
Joined
Jan 19, 2000
Messages
5
I have a summary type report that does adding of decimals and now I need the results to be rounded up to the nearest whole number. Does anyone have any suggestions?
 
Search Access Help for CLong, this function will round fractional numbers to whole numbers.

HTH
RDH
 
CLNG doesn't always seem to round the same way, e.g. Clng(3.5) and Clng(4.5) both seem to give you 4.

I use:

Field1= int(field2*100+.5)/100

That works most of the time for me, though there may be easier/better approaches.

Denny
 
you should also check on Fix, CInt and Int in the help files as they behave differently and treat -ve numbers different to +ve. If you look those up you'll see a reference to Abs as well, which will change -ve numbers to +ve

HTH

Drew
 

Users who are viewing this thread

Back
Top Bottom