to show a bit of code how I currently do it
Code:
Dim frm As Form
Set frm = New Form_frmSchoolsFound
Dim strNewSQL As String
Dim qdf As DAO.QueryDef
Set qdf = CurrentDb.QueryDefs(frm.RecordSource)
strNewSQL = qdf.SQL
Set qdf = Nothing
strNewSQL = Replace(strNewSQL, "WHERE " & Chr(40) & Chr(40) & Chr(40) & "tblSchools.Removed" & Chr(41) & " Is Null" & Chr(41) & Chr(41), "")
With frm
.RecordSource = strNewSQL
.Filter = strWhere
.FilterOn = True
by the time I get to filtering I have slowed down everything. I'd like it to open then filter faster.
To break down what is happening
I make an instance of the form with the recordsource from a saved query
I then grab that recordsource and stuff it into a string using a querydef
then replace the parameter in the string with nothing
then put the instance recordsource as the modded string
then set a new filter