Passing Parameters betwen queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Sorry if this has been answered before, but I couldn't find it via a
search.....

I have a macro with two append queries and a report. I need the start and
end date paraters in all three, for selection in the appends and printed on
the report.

I know how to get the first append query to ask for the dates, but how do I
then pass those date parameters onto the second append query and to the
report.

Thanks in advance for your kind help....
Pat.
 
You cannot share parameters between different queries.

One solution is to use a form, and enter the value there. Then in each
query, refer to the same text box, e.g.:
[Forms].[Form1].[Text0]
All 3 queries will then read the same value, and it is entered once only.
 
The best way to do this is to use a form and controls on the form to hold
the date parameters. Then you can reference the controls on the open form
in your queries.

In your query or report, you would then reference
[Forms]![YourFormName]![YourStartDateControl] instead of [Enter Start Date]

You could actually add a button on the form to run the queries and open the
report.

Check out this article for a detailed discussion.
http://www.fontstuff.com/access/acctut08.htm
 
Back
Top