I was having trouble with a chart report coming up with a blank page. The tip I received is the following which worked great! Note: The mentioned [Forms]![frmChartReports]![EndDate] and [Forms]![frmChartReports]![StartDate] is 2 unbound fields ([StartDate] and [EndDate]) on a form ([frmChartReports]).
The problem is that the row source of the chart is a crosstab query with parameters. Since the fields in a crosstab query are dynamically created, it will treat the parameter as a field. Therefore, the error “The Microsoft Jet database engine does not recognize ‘…’ as a valid field name or expression”. To fix this problem, we need to explicitly declare
[Forms]![frmChartReports]![EndDate] and [Forms]![frmChartReports]![StartDate] as parameters. To do so:
1. Open the “Positions Open by Region and Disc” query in Design view.
2. From Query menu, choose Parameters.
3. Declare [Forms]![frmChartReports]![StartDate] with Date/Time type.
4. Declare [Forms]![frmChartReports]![EndDate] with Date/Time type.
5. Save the query.
At this point, you should be able to view the report with the chart.
The problem is that the row source of the chart is a crosstab query with parameters. Since the fields in a crosstab query are dynamically created, it will treat the parameter as a field. Therefore, the error “The Microsoft Jet database engine does not recognize ‘…’ as a valid field name or expression”. To fix this problem, we need to explicitly declare
[Forms]![frmChartReports]![EndDate] and [Forms]![frmChartReports]![StartDate] as parameters. To do so:
1. Open the “Positions Open by Region and Disc” query in Design view.
2. From Query menu, choose Parameters.
3. Declare [Forms]![frmChartReports]![StartDate] with Date/Time type.
4. Declare [Forms]![frmChartReports]![EndDate] with Date/Time type.
5. Save the query.
At this point, you should be able to view the report with the chart.