rounding (1 Viewer)

vmorgan

New member
Local time
Today, 11:40
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?
 

R. Hicks

AWF VIP
Local time
Today, 06:40
Joined
Dec 23, 1999
Messages
619
Search Access Help for CLong, this function will round fractional numbers to whole numbers.

HTH
RDH
 

dennyryan

Registered User.
Local time
Today, 11:40
Joined
Dec 21, 1999
Messages
45
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
 

KDg

Registered User.
Local time
Today, 11:40
Joined
Oct 28, 1999
Messages
181
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

Top Bottom