Y
Young H. Lee
Based on the record selection criteria entered by a user
(by city, by community, by zip code, or for all), a set of
reports have to be generated. Each report has many
supreports. One solution is to create seperate queries
matching to the various record selection criteria, and
create reports/subreports having those queries as record
sources.
Problem with this approach is the proliferation of queries
and reports/subreports that would increase maintenance
costs.
Please show me how to change the record sources of reports
and subreports dynamically, i.e. through an event
procedure activated upon click a button in the record
selection criteria entry form.
Queries are the tools to generate SQL statements, and I
know that the latter can be generated through a VBA. So
the question boils down to the following:
(1) Is it possible to change the record source of a report
dynamically?
(2) If so, how?
Thank you for your attention.
(by city, by community, by zip code, or for all), a set of
reports have to be generated. Each report has many
supreports. One solution is to create seperate queries
matching to the various record selection criteria, and
create reports/subreports having those queries as record
sources.
Problem with this approach is the proliferation of queries
and reports/subreports that would increase maintenance
costs.
Please show me how to change the record sources of reports
and subreports dynamically, i.e. through an event
procedure activated upon click a button in the record
selection criteria entry form.
Queries are the tools to generate SQL statements, and I
know that the latter can be generated through a VBA. So
the question boils down to the following:
(1) Is it possible to change the record source of a report
dynamically?
(2) If so, how?
Thank you for your attention.