Chart based on query?

G

Guest

I would like to insert a chart into a report that is based on a data entry
query. The underlying query of the report asks the user to enter a [start
date] and a [end date]. The report then displays the appropriate production
data based on that interval.

When I try to build a chart based on that same query, so that along with the
production data a lovely corresponding chart also displays, I get the
following error message:
"The Microsoft Jet database engine does not recognize '[Enter the First
Date]' as a valid field name or expression". When I click OK, the following
message appears:

"An error occurred while sending data to the OLE server...."

Can a chart be based on a data entry query? I'm pulling my hair out over
this! Thank you, Jennifer
 
D

Duane Hookom

It might help if you shared the Row Source property of the chart control. I
expect it might be a crosstab query. You should stop using parameter prompt
queries in favor of referencing controls on open forms. Then your criteria
might be something like:

Between Forms!frmDates!txtStart and Forms!frmDates!txtEnd

If your Row Source is a crosstab then view the query parameters and enter:
Forms!frmDates!txtStart Date/Time
Forms!frmDates!txtEnd Date/Time
 
G

Guest

another method: change your query to a make table query, then use this table
as the data source for the report AND the chart. I ended up using this
method to get around the same issue where I prompt the user for a begin date
and end date.

HTH
SteveD
 

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