Ah: the *report* has no recordsource.
The report contains a graph that has a RowSource.
Since the report itself is not bound to a query, you cannot apply a filter
to it. You will need to use Method 1: the parameter query.
If you want to tie that to a form where you enter the dates, create a form
with 2 unbound text boxes named txtStartDate and txtEndDate. Save the form
as (say) "ReportCriteria".
Now create the query to use as the RowSource for the graph.
In this query, include critera like this under the date field:
Between [Forms].[ReportCriteria].[txtStartDate] And
[Forms].[ReportCriteria].[txtEndDate]
Open the report in design view, and use this query as the RowSource for the
graph object.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Reply to group, rather than allenbrowne at mvps dot org.
Robbie Doo said:
I used the method 2 and the line that generates the error is:
DoCmd.OpenReport strReport, acViewPreview, , strWhere
No, the Chart that is pulled from a query does not have any recordsource
except for when I click on the graph itself it gives me the rawsource
where
the information comes from.