tommeekers
Programmer
I have a very weird problem with filtering a recordset.
The code below is triggered when I press a button. It first runs a query which creates the table temp and then I want to step through each record which meets the criteria in that table using a recordset filter.
It keeps returning an error at the highlighted line. I've used this code before in my application and it works fine, except in this case.
[tt]Error 3251 Operation is not supported for this type of object[/tt]
The code below is triggered when I press a button. It first runs a query which creates the table temp and then I want to step through each record which meets the criteria in that table using a recordset filter.
Code:
Set db = CurrentDb()
Set rs = db.openrecordset("temp")
[highlight]rs.Filter = "[field1] = True"[/highlight]
Set rs = rs.openrecordset
rs.MoveFirst
Do While Not rs.EOF
[COLOR=green]'
'
'[/color]
rs.MoveNext
Loop
It keeps returning an error at the highlighted line. I've used this code before in my application and it works fine, except in this case.
[tt]Error 3251 Operation is not supported for this type of object[/tt]