Count multiple text occurrences in multiple fields...please help

seanpears99

New member
Local time
Today, 11:45
Joined
Dec 8, 2008
Messages
2
Hi everyone

I do not use access yet have been asked as part of an assignment to develop a simple db which I have done however I need to count the occurrences of some text values in multiple fileds to respresent a value of response to a question.

The data is in the following format:-

Field1!Field2!Field3
Often!Rarely!Never
Rarely!Rarely!Never
Often!Never!Often
Often!Often!Rarely

I need to count the number of occurences of Often, Rarely and Never and show totals as:-

Field1!Field2!Field3

Often 3!Rarely 2!Never 2
Rarely 1!Never 1!Often 1
!Often 1!Rarely 1


Can someone please tell me how I can produce this output as soon as please as I need to hand this in tomorrow and I havent got a clue what to do.

Thanks

Sean
 
Use this in each control source you want the count to show up in

=Sum(IIf([field1]="often",1,0))

change the "often" in each to "rarely" "never"

basically this will count only whats in the " " for the field specified

let me know if this helps:cool:
 
Thanks for the reply wiremonkey, however i no hardly anything about access so dont know where to put the expression?

How do I know where the access control source is?

Sorry for being a noob.

Sean
 
Say you had a report (build it from your table) or a form(recommend continous form) add a text box to the bottom(form footer if not there right click in detail section select form header footer but should be there already) or where ever you want and put the expression in the control source(of the text box) Right click on the text box select properities - go to data tab - the control source is the first row at the top. copy paste just change whats in the " " and the field you want to count.
 

Users who are viewing this thread

Back
Top Bottom