charts using a query

T

talktobatchu

Hello,

I'm trying to insert a chart on a report, the chart is
based on a query which takes 'year' as input from the
user and generates the result. The query works fine
separately, but when I run the report with chart
included, it gives a error message as: 'The Microsoft
database engine doesn't recognize [Enter the Starting
Year (>1989)] as a valid field name or expression'.

My query looks as follows::

SELECT HepatitisA_90to03Data.CountyName,
HepatitisA_90to03Data.YearField,
HepatitisA_90to03Data.Cases,
HepatitisA_90to03Data.Population,
HepatitisA_90to03Data.Rate, HepatitisA_90to03Data.District
FROM HepatitisA_90to03Data
WHERE (HepatitisA_90to03Data.YearField=[Enter the
Starting Year (>1989)] Or HepatitisA_90to03Data.YearField=
[Enter Ending Year]) And ((HepatitisA_90to03Data.District)
=[Enter the District Number]);


Also the Row Source of the chart has the code as
following::

TRANSFORM Sum([Cases]) AS [SumOfCases] SELECT [YearField]
FROM [HepatitisA_90to03Query] GROUP BY [YearField]
PIVOT [Cases];

Here I'm trying to retrieve data for the two years which
the user enters and draw a column graph to compare the
two records. Is there any possibility that this can be
done in access.

thank you for any help.

talktobatchu
 
D

Duane Hookom

There is at least one reply in another NG where you asked the same question.
Please don't post the same question to multiple NGs.
 

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