passing filter arguments to sub-report

  • Thread starter Thread starter =?ISO-8859-1?Q?=D8ystein_Sund?=
  • Start date Start date
?

=?ISO-8859-1?Q?=D8ystein_Sund?=

Hello!

How do I pass an argument to the filter property in a sub report?
Or is this a stupid way to filter a sub-report?


Sincerely
Oystein Sund
 
You can assign the Filter property in the Open event of a report, but it
generally doesn't work very well with subreports.

Alternatives:
1. LinkMasterFields/LinkChildFields
If there is a match between a subform field and a field on the main report,
this is the simplest solution.

2. Form control nominated in criteria of subreport's RecordSource
Create a form where the user can enter the limiting values.
Set the RecordSource of the subreport to a query.
In the query, set the criteria to something like this:
=[Forms]![MyForm]![MyTextbox]

3. Rewrite the SQL property of the subreport's query before the report
opens.
 
Alternatives:
1. LinkMasterFields/LinkChildFields
If there is a match between a subform field and a field on the main report,
this is the simplest solution.

Doesn't do the job I want it to..

2. Form control nominated in criteria of subreport's RecordSource
Create a form where the user can enter the limiting values.
Set the RecordSource of the subreport to a query.
In the query, set the criteria to something like this:
=[Forms]![MyForm]![MyTextbox]

3. Rewrite the SQL property of the subreport's query before the report
opens.


Thanks! These two gave me the help I needed!


-
Oystein Sund
 
Back
Top