Getting criteria from form into pie chart

oihjk

Registered User.
Local time
Today, 10:48
Joined
Feb 13, 2003
Messages
51
I'm trying to get the criteria for a chart to come from a form. In a form the user can select the report they won't to run and the other parameters. Instead of doing this through a parameter query I won't it to pass via string criteria
(example:

strItems = Me.AFENumber.Value 'Use the value of Me.AFENumber as the criteria

strDocName = Me.cmbPreview.Value 'Open Report named the same as the value in Me.cmbPreview

DoCmd.OpenReport strDocName, acPreview, , strItems )

I can get it to run fine with the report itself, but when I try using this method on the chart it doesn't work. Is it possible to filter a chart this way?

Eric
 
Last edited:
Eric,

DoCmd.OpenReport strDocName, acPreview

That will launch the report.

If the form is still open, the report can reference any field on
it by:

Me.MyChartsTextbox = Forms![MyMainForm]![SomeField]

Wayne
 
Thank you for the reply. The problem however isn't with the report, It's with the chart. I'm trying to get the chart to filter in the way that you said above. Maybe you're meaning this and I just missed it. Is this possible? Eric
 

Users who are viewing this thread

Back
Top Bottom