Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a filter on a subreport

Status
Not open for further replies.

srmclean

Technical User
Jun 23, 2003
23
0
0
AU
Hi,

Am having a bit of trouble setting a filter on a subreport. I set up a filter string elsewhere and store in a variable and then use the following on the main report: (which works fine)

Code:
Private Sub Report_Open(Cancel As Integer)
    Me.Filter = varSummaryMainFilter
    Me.FilterOn = True
End Sub

What I can't do is use the same on the subreport :

Code:
Private Sub Report_Open(Cancel As Integer)
    Me.Filter = varSummarySubFilter
    Me.FilterOn = True
End Sub

Getting a "The setting you entered isn't valid for this property" error.

It works if I open the subreport on it's own but not under the main report... any thoughts anyone??

I can't seem to set the property via :
Code:
Me.subReport.filter = varSummarySubFilter

either .....

----------------
Shaun McLean
 
Hi
Maybe (?):
Me.SubReportName.Form.Filter = varSummarySubFilter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top