Good Morning,
The following code is used to filter a table called "Class", however a runtime error 3251 returns, stating "Operation is not supported by this type of object. what can be the problem?
Private Sub Command0_Click()
Dim curDatabase As Database
Set curDatabase = CurrentDb
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("Class")
rst.Filter = "Year = 2011" ' The problem is here.
MsgBox rst.RecordCount
Set rst = Nothing
End Sub