Parameter Problems

B

Bill

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?
 
F

fredg

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.
 
B

Bill

Fredg,

Thanks, but unfortunately, you lost me - I'm struggling through the basics
of Access. I'm trying to do exactly what you guessed, and put a note on my
report showing the date range that the data is from. Using a text box in a
report without any chart works fine, but in a report created using the chart
wizard, all I get is
#Name? for the parameter [Enter Date].

Will using a form to define the parameters resolve this problem?

Thanks again in advance,

Bill
 

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