By Richard Rost 3 years ago
Count Records in a Table or Query with Criteria
In this video, I will show you how to count up values from a table or query. We will count up the total number of orders that a customer has and display them on the customer form.
Roberto from Silver City, New Mexico (a Gold Member) asks: I'd like to be able to quickly see the total number of orders that a customer has when I open up their record in the customer form. Right now, I have to open up the order form and look at the number on the bottom. This would save me a lot of time.
Members will see how to use DCount to limit the number of records in a related table (such as in a subform). This would be handy to, for example, set a maximum number of students per class, or a minimum number of items per order. We'll also see how to refresh a parent form when a child form is closed, and put that order count in the button caption. We'll also discuss why you should not use D-functions in queries (use aggregate queries instead).
Silver Members and up get access to view Extended Cut videos, when available. Gold Members can download the database template from class plus get access to the Code Vault. If you signed up on YouTube you have to register on my YouTube Find User page so I can set up your account here on my web site. If you're not a member, Join Today!
microsoft access, ms access, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #instruction, #learn, #lesson, #training, #database, dcount, count records, order count, total number of records, limit number of items, maximum, refresh parent form, button caption, aggregate query
Subscribe to DCount
Get notifications when this page is updated