How do I update a chart based on criteria input?

G

Guest

I hope this question isn't too basic. I created a report with a chart based
on a query. I would like to update the values on the chart based on a date
range and whether maintenance agreement was in effect. The form for the date
range criteria works but for some reason when I add the combo box options as
criteria in the query I get an error message - "This expression is typed
incorrectly, or it is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to variables."

The criteria in the query for the dates is
=[Forms]![diaDateRange]![txtStartdate]<=[Forms]![diaDateRange]![txtEnddate]

The criteria for the combo box with the Yes/No field in the main form is
=[Forms]![frmMaintagronChart]![cboMaintAgr]

My combo choices are "Yes", "No", " ". I started trying it with a group
choice but that seemed to get even more complicated. Any ideas?
 
D

Duane Hookom

A Yes/No field stores -1 or 0, not the strings "Yes" or "No". If this
doesn't resolve your issue, come back with the SQL view of your Row Source
of the chart.

--
Duane Hookom
MS Access MVP

JesseM said:
I hope this question isn't too basic. I created a report with a chart
based
on a query. I would like to update the values on the chart based on a date
range and whether maintenance agreement was in effect. The form for the
date
range criteria works but for some reason when I add the combo box options
as
criteria in the query I get an error message - "This expression is typed
incorrectly, or it is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to variables."

The criteria in the query for the dates is
=[Forms]![diaDateRange]![txtStartdate]<=[Forms]![diaDateRange]![txtEnddate]

The criteria for the combo box with the Yes/No field in the main form is
=[Forms]![frmMaintagronChart]![cboMaintAgr]

My combo choices are "Yes", "No", " ". I started trying it with a group
choice but that seemed to get even more complicated. Any ideas?
 
G

Guest

Thanks for the tip Duane. As it turns out, a pivot chart did exactly what I
was looking for. It provides the user a number of options to eliminate or add
different criteria and immediately updates the chart. I was making the
solution harder than it had to be.

Duane Hookom said:
A Yes/No field stores -1 or 0, not the strings "Yes" or "No". If this
doesn't resolve your issue, come back with the SQL view of your Row Source
of the chart.

--
Duane Hookom
MS Access MVP

JesseM said:
I hope this question isn't too basic. I created a report with a chart
based
on a query. I would like to update the values on the chart based on a date
range and whether maintenance agreement was in effect. The form for the
date
range criteria works but for some reason when I add the combo box options
as
criteria in the query I get an error message - "This expression is typed
incorrectly, or it is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to variables."

The criteria in the query for the dates is
=[Forms]![diaDateRange]![txtStartdate]<=[Forms]![diaDateRange]![txtEnddate]

The criteria for the combo box with the Yes/No field in the main form is
=[Forms]![frmMaintagronChart]![cboMaintAgr]

My combo choices are "Yes", "No", " ". I started trying it with a group
choice but that seemed to get even more complicated. Any ideas?
 

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