THanks
Andy
If so, you need to apply your filtering to the actual query and not the
form. The Filter on the form is form-specific.
There are different ways to do that. You can re-create the SQL Statement
that makes up the query:
Dim qry as DAO.QueryDef
Set qry = CurrentDb.QueryDefs("qryRecordSource")
Set qry.SQL = "....SQL Statement Here which includes a revised Where
clause..."
qry.Close
me.Refresh (to refresh the form, or Forms("formname").Refresh if this code
is not within the Form's Class Module).
Alternatively, you could create parameters within your Query and update the
parameters accordingly. If you want to do this approach, you should further
investigate parameters within queries.
Steve