problem applying filter to a subreport in vba

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I can't seem to get set the Filter property on a subreport using VBA.
Here is my code in the open event of the subreport

Select Case Parent.bytSrt
Case 1
Me.Filter="PersonNo < 4"
Case 2
Me.Filter="PersonNo > 3"
End Select

MSAccess errors with Err# 2101 "The setting you entered isn't valid fo this
property"

my record source is:
"SELECT * FROM tblSirPeople UNION SELECT * FROM tblTempPeople"
and PersonNo should be a valid field
 
I have the same problem, I'm working out to find a solution. But I haven't
still found it.

Can anybody helps?

Dario.
 
I endded up abandoning this way of accomplishing it and created a variable in
the main report (in vba) that keeps track of which subreport is current. In
the subreports open event i incremented the variable and set the subreport's
record scource accordingly in vba
 
Back
Top