A
Amy Blankenship
I have a report that is based on an ordinary parameter query (i.e. right now
it pops up dialogs asking for three values that it needs for its where
clause). I use this query in several places, so I don't want to make the
parameters dependent on specific form controls, which is the only
information I've been able to find on google on feeding parameters in a
report query's Recordsource.
What I actually want to happen is to make a button in the main switchboard
which, when pressed, will look up those values in a different query I
already have and then use those to populate the parameters for the query and
open the form. I think this means that I'll need a macro that launches some
VBA code. And that's fine, I know how to do that. I also know how to run
the query from code to get the parameter values. If I were just _running_
the parameter query from code, I could also do that. What I don't know how
to do is to pass those parameters to the Report to use for its RecordSource.
Does anyone have any sample code that they'd care to share?
Thanks;
Amy
it pops up dialogs asking for three values that it needs for its where
clause). I use this query in several places, so I don't want to make the
parameters dependent on specific form controls, which is the only
information I've been able to find on google on feeding parameters in a
report query's Recordsource.
What I actually want to happen is to make a button in the main switchboard
which, when pressed, will look up those values in a different query I
already have and then use those to populate the parameters for the query and
open the form. I think this means that I'll need a macro that launches some
VBA code. And that's fine, I know how to do that. I also know how to run
the query from code to get the parameter values. If I were just _running_
the parameter query from code, I could also do that. What I don't know how
to do is to pass those parameters to the Report to use for its RecordSource.
Does anyone have any sample code that they'd care to share?
Thanks;
Amy