Solved

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

Posted on 2014-02-12
3
460 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
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 Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

771 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

9 Experts available now in Live!

Get 1:1 Help Now