Request help with reasonably simple query

G

Greg Denehy

Hi All,
I am having a mental block with this query I am writing... (It has been a
while since I have wrriten any but simple queries).
I am working in MSAccessXP

I have a table that has many about 80 fields and 84 records.
It is a survey, and I am tring to produce graphs and datamine from it.
Each question on the survey had 3 answers, yes no or maybe, which were
stored as 1, 2 or 3
Each question was a seperate feild in the DB.

I am now tring to get Access to graph many Yes responses there were to each
question.
I cannot seem to make a query that will give me a cound for each field, but
only counting the yes options.

I need something like:
SELECT
Count([Field1] WHERE [Feild1=1],[Field2] WHERE [Feild2=1],[Feild3] WHERE
[Feild3=1]

Help please?

Thanks everyone!

Greg
 
G

Greg Denehy

I see that makes sense now.
The reason I didn't do it that way is that I did not know how to do that
when designing a form in Access. As far as I can tell, all it lets you do
is put one value in one field.

Greg
Jen said:
Unfortunately, this is not as simple as you may think.
Due to the way your data is structured (not very
relational), it excel may be a better tool. Access is an
RDBMS and doesn't lend itself well to the structure you're
describing. In Access, you would really have about 5
fields on the "Questions" table and maybe another table
for the "Answers" (a one to many relationship) with only
about 2 fields on it. If this was the case, your query
would be very simple.

In short, I don't think there's an easy way around this
problem. I would definitely see if excel can give you the
answers you seek - something that's coming to mind is the
countif function.

Regards,
Jen
Programmer/Analyst
-----Original Message-----
Hi All,
I am having a mental block with this query I am writing... (It has been a
while since I have wrriten any but simple queries).
I am working in MSAccessXP

I have a table that has many about 80 fields and 84 records.
It is a survey, and I am tring to produce graphs and datamine from it.
Each question on the survey had 3 answers, yes no or maybe, which were
stored as 1, 2 or 3
Each question was a seperate feild in the DB.

I am now tring to get Access to graph many Yes responses there were to each
question.
I cannot seem to make a query that will give me a cound for each field, but
only counting the yes options.

I need something like:
SELECT
Count([Field1] WHERE [Feild1=1],[Field2] WHERE [Feild2=1], [Feild3] WHERE
[Feild3=1]

Help please?

Thanks everyone!

Greg


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top