tim_cs
asked on
Recordset.clone help
I'm doing a clone of a recordset using set newRS = me.recordset.clone. I'm then setting the filter for the cloned recordset which works fine. The problem occurs when I try to turn the filter on. I get an error message saying "Object doesn't support this property or method". Why am I able to set a filter for the cloned recordset but not turn the filter on? Is this possible and I'm just doing something wrong?
Set newRS = Me.Recordset.Clone
If newRS.RecordCount > 0 Then
MyBookMark = newRS.Bookmark
newRS.Filter = MyFilter
newRS.FilterOn = True 'Error thrown here.
End If
Set newRS = Me.Recordset.Clone
If newRS.RecordCount > 0 Then
MyBookMark = newRS.Bookmark
newRS.Filter = MyFilter
newRS.FilterOn = True 'Error thrown here.
End If
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Morning :-)
there is no FilterOn
newRS.Filter = MyFilter '''turns on a filter
newRS.Filter = 0 ''turns off the filter
newRS.Filter = MyFilter '''turns on a filter
newRS.Filter = 0 ''turns off the filter
With rs
.Filter = MyFilter
Set rs = .OpenRecordset
End With