.Filter Help

jbailey4545

New member
Local time
Today, 15:29
Joined
Jun 1, 2012
Messages
5
Need help getting this correct. Need to filter ADO rst by 2 criteria.

I know this is way off but to give you an idea.

rst_pc_table.Filter "person_id = " & Current_PersonID And "client_id = " & Current_ClientID
 
And needs to be inside the quotes, plus you missed the & there.
 
Here is what I changed it to

rst_pc_table.Filter "person_id = " & Current_PersonID & "And client_id = " & Current_ClientID
Now I get "Compile error: Invalid use of property" and the .Filter is highlighted.
 
I've never tried to filter an open recordset, I filter as I open, like:

strSQL = "SELECT...WHERE..."
Set rs = db.OpenRecordset(strSQL, dbOpenDynaset)

It would be more efficient than opening the recordset on the whole table, then filtering.
 

Users who are viewing this thread

Back
Top Bottom