Solved

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

Posted on 2014-02-12
3
475 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 37

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 37

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

724 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