D
Darrell
In have created a "main" report to house 2 subreports. There is not a
record source for the main report.
I have two issues:
First, I need to filter each subreport's record source based on
parameters (Begin Date and End Date) I collect with 2 input boxes, then
store in class.begindate and class.enddate. When I open a subreport
INDEPENDENT of the main report, setting a filter for the report works
beautifully.
(
Me.FilterOn = True
Me.Filter = "[Date] >= #" & class.begindate & "# And [End Date] <= #" &
class.enddate & "#"
)
When, however, I open the subreport as part of the main report, the code
raises error 2101 on Me.FilterOn, "The setting you entered isn't valid
for this property."
Second, in the same scenario, the value of class.begindate and
class.enddate is flagged as "Object variable or With block variable not
set". The class is instantiated in the main report Open event and the
properties are set.
(
Set class = New Class
class.begindate = InputBox(...)
class.enddate = InputBox(...)
)
What am I missing?
Thanks, as always, for all help.
Darrell
record source for the main report.
I have two issues:
First, I need to filter each subreport's record source based on
parameters (Begin Date and End Date) I collect with 2 input boxes, then
store in class.begindate and class.enddate. When I open a subreport
INDEPENDENT of the main report, setting a filter for the report works
beautifully.
(
Me.FilterOn = True
Me.Filter = "[Date] >= #" & class.begindate & "# And [End Date] <= #" &
class.enddate & "#"
)
When, however, I open the subreport as part of the main report, the code
raises error 2101 on Me.FilterOn, "The setting you entered isn't valid
for this property."
Second, in the same scenario, the value of class.begindate and
class.enddate is flagged as "Object variable or With block variable not
set". The class is instantiated in the main report Open event and the
properties are set.
(
Set class = New Class
class.begindate = InputBox(...)
class.enddate = InputBox(...)
)
What am I missing?
Thanks, as always, for all help.
Darrell