Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count items in a field 1

Status
Not open for further replies.

BranJosh

Technical User
May 13, 2001
3
US
Hello,

First Timer

using Access 2000 and I am trying to return a count of all items in certain fields that are not blank, but contain info

I have tried count, which counts rows and blanka functions any ideas ?

Thanks for your help in advance
 

This will count Non Null entries in the Item column.

Select count(Item) As ItemCnt
From table1
Terry

X-) "I don't have a solution, but I admire your problem."
 
of course, you need to do this seperatly for each column you need the cout for. if you are trying to get the count of records where all of the items are non-null, it takes a slightly different approach.


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Thanks for the input, kinda sure what your recommending, what I'm attempting to do is count all the entries in a colum, gathering and average and yet showing the total number of respondants to each questions..


Example

20 people responded overall with, 5 respondants giving a overall rating of 4 for satifaction....

The results would then be reported 20 people overall responded to the survey, resulting in 25% of the (5) people being "Completly Satisfied"

Thanks for your help again advance again
 

Sounds like you may want a cross-tab query. Use the Cross-tab query wizard to create the query. You'll get a query that looks like this.

TRANSFORM Count(*) AS CountOfRecs
SELECT survey.Quest, Count(*) AS TotCnt
FROM survey
GROUP BY survey.Quest
PIVOT "Ans" & [Ans];


The output will be something like this.

[tt]Quest TotCnt Ans0 Ans1 Ans2 Ans3 Ans4 Ans5
1 19 1 2 5 4 5 2[/tt]

You'll probably have to tweak the query but this should get you on your way. That is if I understand your requirement. If not let us know. Terry

X-) "Life would be easier if I had the source code." -Anonymous
 
Thanks again very helpful !!!!!!


tgayne@jonhall.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top