Solved

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

Posted on 2014-02-12
3
470 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 36

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 36

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

828 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