473,387 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Yes/No total query

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
3 4680
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
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
Thanks for your help :)

regards

impakt

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: krystoffff | last post by:
Hi I would like to paginate the results of a query on several pages. So I use a query with a limit X offset Y to display X results on a page, ok. But for the first page, I need to run the...
2
by: phaddock4 | last post by:
Please help. GOAL: I hope to calculate a total amount in a TotalQuery (or field in the SubQuery?), based upon three field amounts in a SubQuery. STATUS: When I create an expression in the...
2
by: mhodkin | last post by:
I created a query in which I have grouped data by City. I wish to calculate the percent of each value, e.g. City/(Total count of all Cities), in tbe next column of the query. I can't seem to...
5
by: deercreek | last post by:
I have the following sql query listed below. I show the out put be low that. I am trying to get this query to toatl and only show the line of information with the total on it. Do you have any...
4
by: mukeshhtrivedi | last post by:
I have TYPE field which has 3 data like HEAD, TRACK and PANEL. Now whenever any person works on HEAD we put 8 Hrs in HRS filed and in LABOR field it reflects the dollar value automatically like...
5
by: solargovind | last post by:
Hi, I hve some problem in query. My query is too long and linked with many table which make you confusion. So, hereby i explain you my problem by below example. The tables and Fields are.. ...
15
klarae99
by: klarae99 | last post by:
I am working on an Inventory Database in Access 2003. I am working on a report that I could print when its time to file our State Sales Tax paperwork. The figures I need for this report are Total...
2
klarae99
by: klarae99 | last post by:
Hello, I am working in Access 2003 on an inventory database. Right now I am working on a report which will be used to fill in forms that our state requires periodically to collect taxes. Right...
1
by: silversubey | last post by:
I am using a query to total hours (Cltbudget.CBudhours) and dollars (CltBudget.CBudFee) Grouped by client names (Cltbudget.CBudCltName). here is the Query: SELECT CltBudget.CBudCltName AS Client...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.