Charts with filters from a form

Darth Vodka

Registered User.
Local time
Today, 08:55
Joined
Sep 25, 2007
Messages
343
thought this might have been easy, but no....

i want to have a form with a [DateFrom] and [DateTo] text box

you click a button, it goes to a chart and the chart is filtered between those dates (the chart has week along the x axis)

problem is, the recordsource of a chart in a report is a crosstab query and you can't put form filters into a cross tab query

have tried to ram the parameters in before opening it with

Code:
CurrentDb.QueryDefs("qry_Reporting_Charts").Parameters("DateFrom").Value = [txtFrom]
CurrentDb.QueryDefs("qry_Reporting_Charts").Parameters("DateFrom").Value = [txtTo]
DoCmd.OpenReport [cmbReports].Value, acViewPreview

but it looks like the parameters are read only or something :confused:

any ideas anyone?

thanx in advance
 
query your crosstab query with a select query and put the parameters in the select query..... perhaps

L
 
query your crosstab query with a select query and put the parameters in the select query..... perhaps

L

ack, forgot i could do that, actually i set a normal select with parameters and then the charts in a report can crosstab it ok

ta muchly
 

Users who are viewing this thread

Back
Top Bottom