How to use a single Prompt to supply parameter for macro generating 2 reports

  • Thread starter Thread starter quaddawg via AccessMonster.com
  • Start date Start date
Q

quaddawg via AccessMonster.com

I have two reports that I want to print from a command button. I want the
user to supply a date as a parameter one time and have the macro print two
Thank You letters, one for New Members and one for Renewals.

As it stands now, both reports use a single query that prompts for a date and
the query selects records with a MemberStatus of "1" (for Renewal) and "2"
(for New Members) (these were entered on a form). The command button opens
the macro which prompts for the date for each report that it opens. The Where
Condition filters the records into the two categories.

Here's my question: This works ok, but it's certainly not elegant because the
user has to enter the date twice. There must be an obvious way to have the
command button prompt for the date one time and use that value to select or
filter the records, which are further categorized by the Where conditions of
the macro, but I don't know enough to know how to pull it off.

Any advice is much appreciated,
Lawton
 
Lawton,

My suggestion would be to put an unbound textbox on the same form with
your command button, and have the user enter the date criteria in there.
Then, in the Criteria of the query, replace the existing parameter
prompt text with the equivalent of...
[Forms]![NameOfForm]![NameOfDateTextbox]

This approach has a number of advantages over a Parameter Query.
 
Steve,
I like it. Eliminates the surpise/annoyance of a parameter prompt pop-up
altogether.
Thanks,
Lawton

Steve said:
Lawton,

My suggestion would be to put an unbound textbox on the same form with
your command button, and have the user enter the date criteria in there.
Then, in the Criteria of the query, replace the existing parameter
prompt text with the equivalent of...
[Forms]![NameOfForm]![NameOfDateTextbox]

This approach has a number of advantages over a Parameter Query.
I have two reports that I want to print from a command button. I want the
user to supply a date as a parameter one time and have the macro print two
[quoted text clipped - 14 lines]
Any advice is much appreciated,
Lawton
 
Yes, Lawton, a a full-time Access developer, I have never used a
Parameter Query, and can't think of a situation where I would want to.
 
Back
Top