Angeline,
I don't understand. Calculate what as a percentage of what? Maybe an
example would help.

Signature
Steve Schapel, Microsoft Access MVP
> Hi,
> I am fumbling around building a database without actually knowing SQL but
[quoted text clipped - 13 lines]
> Thankyou
> Angeline
Angeline - 21 May 2005 10:46 GMT
Steve,
Apologies. I shall explain.
I have a table of data which are survey results. I am trying to write a
query which will show me the percentage of people that answered "yes", "no"
and "neutral" to a particular question. I can write a query which will
'count' the number of 'yes' 'no' and 'neutral' responses, but I would really
like it to tell me the percentage instead. ACCESS needs to divide the number
of "yes" responses by the total number of responses in order to get the
percentage. I think that maybe I need to write a query off a query but each
time I attempt this I seem to be getting syntax errors.
Does this help?
Thanks so much for your help.
> Angeline,
>
[quoted text clipped - 18 lines]
> > Thankyou
> > Angeline
Steve Schapel - 21 May 2005 19:56 GMT
Angeline,
A couple of possibilities...
Make a query that simply gives you a total count of survey responses.
Then add this query to your existing query where you do the count for
each category, which will allow a percentage column in the query
something like this...
Percentage: Count([Response])/[CountOfResponses]
Use a domain aggregate function, for example...
Percentage: Count([Response])/DCount("*","YourTableName")

Signature
Steve Schapel, Microsoft Access MVP
> Steve,
> Apologies. I shall explain.
[quoted text clipped - 9 lines]
> Does this help?
> Thanks so much for your help.
Angeline - 23 May 2005 05:51 GMT
Thanks Steve,
Yes I see that logic - great idea, thank you very much!
Angeline
> Angeline,
>
[quoted text clipped - 22 lines]
> > Does this help?
> > Thanks so much for your help.
Angeline - 21 May 2005 11:03 GMT
Steve,
Apologies I will explain.
I have a table which is actually the results of a survey. I have written a
query which counts the number of "yes", "no" and "neutral" responses to a
particular survey question. I would really like to know how to write the
query so that rather than give me the number of responses, it gives me the
percentage. Therefore ACCESS would need to divide, the number of "yes"
responses by the total number of responses and likewise for "no" and
"neutral". How do I get ACCESS to do this, do I need to write a query on a
query ?
Thanks for your help!
Angeline
> Angeline,
>
[quoted text clipped - 18 lines]
> > Thankyou
> > Angeline