Help with Parameter Query using MathamaticalExpressions

P

prismlight

Hello,
I hope someone can hep me. First here is the query (Thanks John and Bill)


PARAMETERS [Begin Date] DateTime, [End Date] DateTime;
SELECT FSAClients.EthnicGroup, Count(*) AS Total, Count(*)/(SELECT
Count("*") FROM FSAClients
WHERE DateSerial([StartYear], [StartMonth], 1) <= [End Date] And
(DateSerial([EndYear], [EndMonth]+1, 1) - 1) >= [Begin Date]) AS
PercentByGroup
FROM FSAClients
WHERE (((DateSerial([StartYear],[StartMonth],1))<=[End Date]) AND
((DateSerial([EndYear],[EndMonth]+1,1)-1)>=[Begin Date]))
GROUP BY FSAClients.EthnicGroup;

I need the results to produce 3 column Feilds:
EthnicGroup Total Percent

So far, when I do the query it promts me for StartDate and EndDate, however
the percentages dont come out right because of the langauge of the query?
Can anyone help?

Thanks in advance,
denise
 
V

Van T. Dinh

It looks to me that

Count("*")

should be

Count(*)

HTH
Van T. Dinh
MVP (Access)
 

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