UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Counting Records, Office 2010    
 
   
Brandi
post Apr 10 2012, 03:20 PM
Post #1

UtterAccess Guru
Posts: 931



I have a field on a report that displays P, ET, or KC.
At the bottom of the report, I want to count this field and have it tell me how many P's there were, how many ET's, and how many KC's.

It seems like this should be a simple thing but I haven't been able to get the syntax.

Is it something like Count([Fieldname] where [fieldname] = "P")

Thank you.
Brandi
Go to the top of the page
 
+
theDBguy
post Apr 10 2012, 03:24 PM
Post #2

Access Wiki and Forums Moderator
Posts: 48,107
From: SoCal, USA



Hi Brandi,

Here's one possible way:

1. Create three separate textboxes in the Details section.
2. Use the following expression to count each category:

=Sum(IIf([FieldName]="P",1,0))

3. Replace the category for the other textboxes.
4. Set the Visible property of these textboxes to "No"
5. In the footer section of the report, create another set of three textboxes and point them to each of the textboxes you created in the Details section. For example:

=[Text1]

Just my 2 cents... (IMG:style_emoticons/default/2cents.gif)
Go to the top of the page
 
+
Brandi
post Apr 10 2012, 09:32 PM
Post #3

UtterAccess Guru
Posts: 931



Got it to work. I was hoping there might be an easier way to do this in 2010.

Thank you.
Brandi
Go to the top of the page
 
+
theDBguy
post Apr 10 2012, 09:34 PM
Post #4

Access Wiki and Forums Moderator
Posts: 48,107
From: SoCal, USA



Hi Brandi,

(IMG:style_emoticons/default/yw.gif)

QUOTE (Brandi @ Apr 10 2012, 07:32 PM) *
I was hoping there might be an easier way to do this in 2010.

If there is, I haven't tried it yet.

Good luck with your project.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 24th May 2013 - 06:20 PM