Generate Report by Field Value - not just the field

adam12

Registered User.
Local time
Today, 17:47
Joined
Mar 2, 2007
Messages
10
I am looking to generate a report that will give me the number of the actual value of the field, not just sort it by the field or give me the table total.

Example: Combo-box with 20 names in it. It's used to record who has made an observation about something. I want to be able to generate a report based on that selected name and give me the total number of observations linked to that name. Problem i'm running into is that the report is giving me all the names, and only counting the number of records, not the number of names per record...

I've researched this as much as I could before posting this, so if I missed an already discussed post, I apologize. :(
 
How are you currently doing it? One way is to use a DCount, which you can limit by criteria:

Me.YourTextBox = DCount("[YourFieldToCount]","YourTableOrQueryNameHere","[YourFieldToLimitBy]='" & Me.ComboNameSelectHere & "'")

And if your "FieldToLimitBy" is not text, but ID number then:

Me.YourTextBox = DCount("[YourFieldToCount]","YourTableOrQueryNameHere","[YourFieldToLimitBy]=" & Me.ComboNameSelectHere)
 
I will try and see what I come up with...never knew how to use that field before now. Thanks.
 

Users who are viewing this thread

Back
Top Bottom