R
Robert Neville
I would like to add filter functionality to open several reports
through a form. This question may be rudimentary, yet I have less
experience with filtering data outside from queries.
Here's the scenario my report groups by project names; grouped by
companies; has a subreport for project addresses for multiple
addresses under project grouping; has a subreport for company
addresses for multiple addresses under company grouping; has a
subreport for contacts. The report has a record source to the project
table, tblProj. All subreport have a record source combining the
relationship table with the primary table (trelCompAddr and tblAddr).
A company could have multiple addresses. The relationship table,
trelCompAddress contains phone numbers and email data.
I would like to filter the report by area code meaning that only
projects or companies with a particular area code and phone number
would print. Normally, I would create a query with tblProj,
trelProjAddr, and tblAddr; and set the phone field criteria to Like
212*. But the report has two phone number fields in different tables,
trelProjAddr and trelCompAddr. Second, changing the record source to a
jumbo query with all tables becomes cumbersome and list some projects
or companies more than once. Thus the jumbo query return duplicates
for some reason. This scenario happens when the project or company has
multiple addresses. This feat seems more ambition without changing the
report grouping or removing the three sub-report.
In an ideally world, I could open the report and change the record
source to include the criteria from the form. The report would return
the record source query to the original upon exit. But this approach
becomes a challenge with sub-report events firing before the main
report. Let me know if you could set the record sources for the
sub-reports from a form. How?
Let me know if someone could elaborate more on opening a report and
restricting the dataset under a complex relationship structure.
Other threads mentioned that Access's filter property is unreliable.
Please confirm the reliability of Access's Filter Property and how it
should be used. In addition, please be explicit about your
suggestions. I am having trouble referring to the report and
sub-report from a separate form or module.
through a form. This question may be rudimentary, yet I have less
experience with filtering data outside from queries.
Here's the scenario my report groups by project names; grouped by
companies; has a subreport for project addresses for multiple
addresses under project grouping; has a subreport for company
addresses for multiple addresses under company grouping; has a
subreport for contacts. The report has a record source to the project
table, tblProj. All subreport have a record source combining the
relationship table with the primary table (trelCompAddr and tblAddr).
A company could have multiple addresses. The relationship table,
trelCompAddress contains phone numbers and email data.
I would like to filter the report by area code meaning that only
projects or companies with a particular area code and phone number
would print. Normally, I would create a query with tblProj,
trelProjAddr, and tblAddr; and set the phone field criteria to Like
212*. But the report has two phone number fields in different tables,
trelProjAddr and trelCompAddr. Second, changing the record source to a
jumbo query with all tables becomes cumbersome and list some projects
or companies more than once. Thus the jumbo query return duplicates
for some reason. This scenario happens when the project or company has
multiple addresses. This feat seems more ambition without changing the
report grouping or removing the three sub-report.
In an ideally world, I could open the report and change the record
source to include the criteria from the form. The report would return
the record source query to the original upon exit. But this approach
becomes a challenge with sub-report events firing before the main
report. Let me know if you could set the record sources for the
sub-reports from a form. How?
Let me know if someone could elaborate more on opening a report and
restricting the dataset under a complex relationship structure.
Other threads mentioned that Access's filter property is unreliable.
Please confirm the reliability of Access's Filter Property and how it
should be used. In addition, please be explicit about your
suggestions. I am having trouble referring to the report and
sub-report from a separate form or module.