I'm having a problem filtering a subreport. The subreport is not connected to the main report (by that I mean the link child and parent fields are empty). If I set the Filter property of the subreport in the properties box the filter runs fine. The problem is I need to filter at runtime so I'm trying to apply the filter in VBA. I've tried to reference the Filter and FilterOn properties several ways with no luck. I'm not sure if my syntax is off or if the Filter property is not available for a subreport. Here is what I've tried so far.
1. This works if the report is opened by itself but give an error of "The setting you selected isn't valid for this property" and debugs to the sub's open event below.
subreports open event
me.filteron = true
me.filter = "Date > #11/15/01#"
end
2. I've tried to reference the sub filter from the open event of the main report with similiar errors using the syntax,
me.(subreportname).Form.FilterOn = True
Any help will be greatly appreciated!!! Thanks
1. This works if the report is opened by itself but give an error of "The setting you selected isn't valid for this property" and debugs to the sub's open event below.
subreports open event
me.filteron = true
me.filter = "Date > #11/15/01#"
end
2. I've tried to reference the sub filter from the open event of the main report with similiar errors using the syntax,
me.(subreportname).Form.FilterOn = True
Any help will be greatly appreciated!!! Thanks