Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Glossary

New Entries Added Almost Daily!
Click here to get on our Mailing List

   

   Access    Excel    Word    Windows    HTML

 
MS Access

DAvg

Using the DAVG Function

In this tutorial you will learn how to use the DAVG Function.

Take an example Table of Customers.

CustomerT
CustomerIDFirstNameLastNamePhoneCustomerSinceCreditLimitDaysGraceIsActive
1RichardRost716555777701/01/201210011True
2JoeSmith716555343401/03/19905005True
3SuzanJones562436514602/01/199815002False
4AlanWatson419389121217/05/2012503True
5AnnaPicore71323647905/05/200510204True
6RonaldSimms780746546804/04/1992502True
7DonaldBarker416441555501/03/19982505True
8BennySperduti716726726206/04/199916007False
9PeteSmith564559777704/04/20005003False
10BarbraPeters829282728831/12/2005501True
11JoeJones549546546601/06/20045003True
14PezzDispo26/09/201204True
16BobSmith04/10/201209True

For this example we wish to Average the CreditLimit but only if the Customer is Active.

The DAVG function returns the average from a specified set of records (or domain).

=DAVG(Field, Domain, Criteria)

DAVG - Function Engine

The answer being $342.10.

FORM

In a Form you could set the Default Value of a Textbox to

	=DAVG("CreditLimit", "CustomerT", "IsActive=TRUE")
	
VBA

In a Form add a TEXTBOX control and rename it "txtDAvg", then you could add the following in the Load Event.

	Private Sub Form_Load()
		txtDAVG = DAvg("CreditLimit", "CustomerT", "IsActive=TRUE")
	End Sub
	

Courses

Want to learn more? Request this via the contact form.

Search

You can find more about this by searching the website.


Alex Hedley (Avatar) By: Alex Hedley


Click here to sign up for more FREE tips

 

 

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 11/8/2024 10:59:47 AM. PLT: 0s