By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,797 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

Passing dates to a query for use in a chart

P: n/a
Using Access 2002.

I have a chart in a report that is currently based on a query in which
the user enters the start and end date for the chart to display. Both
the start and end dates have been identified as parameters so that the
date range can be found without causing an error. So far so good,
report works as it should.

Here's the problem. There are several reports that need to be printed
at the end of month that use the same date ranges. Is there any way
to have the query pick up its start and end dates from a form instead
of entering it for each report? I have tried experimenting with this,
but have a problem with the parameter values. If I completely remove
the parameter values, I get the typical OLE error. If I attempt to
modify the parameters to match the Forms!.... information, I get a
bracketing error. Has anyone been able to get through this and if so,
what did you do?

Thanks for any help you can provide,

Mike.
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Yes, have you tried a "query by form?" Create an unbound form with two
unbound date-datatype text boxes. Make a separate query for each of your
reports and in the criteria row of the date column of the queries, add this:
"Is Not Null And Between [Forms]![your new form's name]![name of BEGINNING
date unbound text box on form] And [Forms]![your new form's name]![name of
ENDING date unbound text box on form]." (Without the quotes!) Be sure each
of your reports has the applicable parameter query as its record source.
Add a button for each report on the unbound form. Now, you can print all of
your reports from the new form without reentering the dates.

Denny G.
"Michael DeLawter" <mi********@hotmail.com> wrote in message
news:40*************************@posting.google.co m...
Using Access 2002.

I have a chart in a report that is currently based on a query in which
the user enters the start and end date for the chart to display. Both
the start and end dates have been identified as parameters so that the
date range can be found without causing an error. So far so good,
report works as it should.

Here's the problem. There are several reports that need to be printed
at the end of month that use the same date ranges. Is there any way
to have the query pick up its start and end dates from a form instead
of entering it for each report? I have tried experimenting with this,
but have a problem with the parameter values. If I completely remove
the parameter values, I get the typical OLE error. If I attempt to
modify the parameters to match the Forms!.... information, I get a
bracketing error. Has anyone been able to get through this and if so,
what did you do?

Thanks for any help you can provide,

Mike.

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.