Access 2007 Macro Designer - Get and reuse parameter from user
I have a simple Access macro that opens two forms and filters them based on input from the user.
I used parameter queries to accompl开发者_开发百科ish this, so my Where condition for both reports reads:
[PONumber]=[Enter PO Number]
As it currently stands, an input box pops up twice - once for each report. I was hoping that I could somehow re-use the value from the first input box.
How do I accomplish this?
I would dissent from @HansUp's answer. Don't hardwire any criteria into your saved QueryDefs, nor into the recordsources of forms and reports. Instead, open the forms/reports with WHERE criteria chosen by opening an unbound form to collect the relevant criteria.
精彩评论