Count number of times a field has been selected

Steven.Ashby82

Registered User.
Local time
Today, 21:29
Joined
Jan 14, 2013
Messages
63
Hopefully this will make sense.

I'm compiling a monthly report based on data from my table "JobSheet"

I want to count how many times last month a specific field was entered, it's a drop down list which is formed from it's own table "Problem"

Is there a simple way of doing this?
 
Please can you explain a bit more- if the selected item updates a table then a simple dcount should do the job, but if it is selected and a table is not updated then you would need a bit a vba
 
Sorry, So i've attempted to use "best practice" I've a dependent cbo within my main table (JobSheet), I've designed the dependent cbo as numeric values with IDs and then used the 0cm column width trick in my form.

The user select there name, the date etc and then selects from a drop down which catagory of job theyve done at what time and that then gives a second drop down list based on the category. It's the second category that I want to take the information from.
 
you still haven't explained if you want to see this in a form or a query or whether you only want to see one seconddropdown or all of them - but then I didn't ask in that detail:)

for a form (for a single seconddropdownvalue)
dcount("[seconddropdown]","YourTable","[Seconddropdown] = " & yourID & " AND month([TableDate])=month(dateadd('m',-1,now()))-1)

or in a query for all seconddropdownvalues

SELECT [seconddropdown], count([seconddropdown]) from yourtable group by [seconddropdown] WHERE month(TableDate)=month(dateadd('m',-1,now()))-1
 

Users who are viewing this thread

Back
Top Bottom