Help with DAvg Function

SpiritedAway

Registered User.
Local time
Yesterday, 20:00
Joined
Sep 17, 2009
Messages
97
I have an unbound text box on my form -

the control source is =DAvg("PercentComplete","tblProgress","ProgressID > 0")

It calculates the average of a set of numeric values in "PercentComplete" column.

At present it's returning an average 49.1666666666667

How can I get it to simply return 49 :) and not 49.1666666666667.:mad:

Any ideas will be helpful.

SpiritedAway
 
Last edited:
Hi vBaInet,

Thanks for responding.

Could you tell me, how and where to add the Round () function
 
A quick search in the Access help files would explain.

=Round(DAvg("PercentComplete","tblProgress","ProgressID > 0"), 0)
 
Done some research on the subject,

I understand it much clearly now.

Thanks for pointing me in the right direction.
 
I'm glad you didn't just copy and paste the code into your db but also did some research to understand it too :)

You're welcome.
 
I don't see any point to simply copy and paste code without at least trying the understand the physics of it. It's much rewarding to know what your code is actually doing and why. How it fits together is the best part. That way, at least I can share what I've learnt with other people along the way.

Thanks once again.
 
Some posters don't take that initiative sadly :( lol

Happy coding.
 

Users who are viewing this thread

Back
Top Bottom