I'm having trouble displaying parameters in a report that has a chart. I'm
charting data from a querry, and want to display the parameters used in the
report. Using the format [Parameter Name] is not working. It works for me
in other reports that
don't contain charts.
What am I missing?
Are you trying to have a chart label show something like this?
"Sales for May 2003"
With the date changing according to the query parameters?
If a form is used to enter the parameter...
Make sure the chart has a Title label.
Code the Report section's Format event that the chart is placed in:
Me!OLEUnbound0.ChartTitle.Text = "Sales for " &
Format(Forms!frmDate!StartDate, "mmmm yyyy")
Me!OleUnbound0.Refresh
If just the query parameter prompt is used:
Me!OLEUnbound0.ChartTitle.Text = "Sales for " & [Enter Date]
Me!OLEUnbound0.Refresh
where [Enter Date] is identical to the bracketed text in the query
parameter.
Change OLEUnbound0 to whatever the control name is of your chart
control.
Alternatively, you could simply place a label over an unused portion
of the chart:
LabelName.Caption = "Sales For " & [Enter Date]
[Enter Date] being the query parameter prompt.