Hi,
I have a form that shows records from ADODB recordset.
When I try to apply filter to the underlying recordset it works all right but the form doesn't reflect the changes. It shows same rows as before filtering. In debug I can see that the recordset contains only filtered records.
Me.Refresh (Recalc, Requery) doesn't help.
Code is as follows:
Dim rs As New ADODB.Recordset
rs.Open sql, conn, adOpenStatic, adLockOptimistic
Set Me.Recordset = rs
Sub combo_AfterUpdate()
Me.Recordset.Filter = "CompanyNo = 123"
End Sub
The form is in Continuous forms mode.
I cant use DAO because the data comes from SQL server user-defined function.
Any help would be greatly appreciated.
I have a form that shows records from ADODB recordset.
When I try to apply filter to the underlying recordset it works all right but the form doesn't reflect the changes. It shows same rows as before filtering. In debug I can see that the recordset contains only filtered records.
Me.Refresh (Recalc, Requery) doesn't help.
Code is as follows:
Dim rs As New ADODB.Recordset
rs.Open sql, conn, adOpenStatic, adLockOptimistic
Set Me.Recordset = rs
Sub combo_AfterUpdate()
Me.Recordset.Filter = "CompanyNo = 123"
End Sub
The form is in Continuous forms mode.
I cant use DAO because the data comes from SQL server user-defined function.
Any help would be greatly appreciated.