Solved

How do I count criteria from a dropdown list on a form in a Microsoft Access report?

Posted on 2014-02-12
3
464 Views
Last Modified: 2014-02-13
I have a combo box linked to field "Case Contact Method" with "Face-to-Face", "Phone", and "Other" as the drop down list criteria. The user will click a button which will prompt for start and end date then run a report (based on a query) pulling first name, last name, and Case Contact Method. This list is populated. I have a total count for all contacts but would like a broken down count for each at the bottom of the report based on the dates provided in the date range prompt mentioned.

I believe this would require a DCount function but I cannot get the syntax right.
0
Comment
Question by:OneByte
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
ID: 39854261
You could use DCount() but then you'd need to know what all the values are and modify the report if they changed.  I would create a totals query and add a subreport to the report footer to display it.  It will be sort of a recap.

Select ContactMethod, Count(*) AS RecCount
From YourTable
Group By ContactMethod
0
 

Author Comment

by:OneByte
ID: 39854425
Works out fine with the query as a sub report. Thanks. It's not that big of a deal but is there a way I can have the others listed and displaying zero if there are none within the dates set?
0
 
LVL 34

Expert Comment

by:PatHartman
ID: 39857425
If you have a table that has a complete list, add that to a query and use a left join that says select all rows from the list table and matching rows from the table with the data.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
My experience with Windows 10 over a one year period and suggestions for smooth operation
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now