By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,027 Members | 1,199 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,027 IT Pros & Developers. It's quick & easy.

Yes/No total query

P: n/a
Hi all...

I'm making a database which is a survey on coastal safety.
One of the questions asked is what activities the respondant
uses the coast for...I have the following:

Fishing
Surfing
Swimming
Walking
Diving
Other
These are all check box's.

I am trying to make a query that will give me the total number of
'yes' responces for each of the above, I then want to make a bar chart
using the MS chart object to give a graphical display of the results.

I've tried everything and cant figure it out..it should be a simple
case of using the 'total' function, but this returns the total amount
of responces, regardless of them being yes or no.

How can I make the query only total (or count) the 'yes' responces?
Thanks in advance
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You need to run a totals query with the criteria of the checkbox field set to
true.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Impakt" <fc******@mail.iinet.net.au> wrote in message
news:40****************@news.iinet.net.au...
Hi all...

I'm making a database which is a survey on coastal safety.
One of the questions asked is what activities the respondant
uses the coast for...I have the following:

Fishing
Surfing
Swimming
Walking
Diving
Other
These are all check box's.

I am trying to make a query that will give me the total number of
'yes' responces for each of the above, I then want to make a bar chart
using the MS chart object to give a graphical display of the results.

I've tried everything and cant figure it out..it should be a simple
case of using the 'total' function, but this returns the total amount
of responces, regardless of them being yes or no.

How can I make the query only total (or count) the 'yes' responces?
Thanks in advance

Nov 12 '05 #2

P: n/a
Create a new query which includes all of the yes/no fields.
Now change each column so that it says
Abs(Fishing)
Abs(Surfing)
etc
(You'll get Expr1 etc as fieldnames now: you can change these to anything
you like apart from existing field names.)

Now convert the query to a totals query and set a ALL the Group By entries
to Sum.

Run the query.

Regards

Peter Russell
Impakt previously wrote:
Hi all...

I'm making a database which is a survey on coastal safety.
One of the questions asked is what activities the respondant
uses the coast for...I have the following:

Fishing
Surfing
Swimming
Walking
Diving
Other
These are all check box's.

I am trying to make a query that will give me the total number of
'yes' responces for each of the above, I then want to make a bar chart
using the MS chart object to give a graphical display of the results.

I've tried everything and cant figure it out..it should be a simple
case of using the 'total' function, but this returns the total amount
of responces, regardless of them being yes or no.

How can I make the query only total (or count) the 'yes' responces?
Thanks in advance


Nov 12 '05 #3

P: n/a
Thanks for your help :)

regards

impakt

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.