I have a large table. I am making a form that displays the table, and allows the user to use Access' standard filters on many different fields to choose only some of the data. Then, after the user has used the filters to choose only some of the data, I want to be able to include only the resulting recordset (and not the entire original table) in various queries.
I'm not sure if there's a way I can directly reference the form's underlying recordset in a query.
I tried iterating through the entire form's recordset and dumping it into a new table, and then using that table, but this is incredibly slow on large datasets.
Here is the code I used:
Is there an alternate way of doing this?
I'm not sure if there's a way I can directly reference the form's underlying recordset in a query.
I tried iterating through the entire form's recordset and dumping it into a new table, and then using that table, but this is incredibly slow on large datasets.
Here is the code I used:
Code:
CurrentDb.Execute "DELETE FROM FilteredJobs"
Dim rs As Recordset
Set rs = Search_subform.Form.RecordsetClone
rs.MoveFirst
While Not rs.EOF
CurrentDb.Execute "INSERT INTO FilteredJobs VALUES (" & rs.Fields("JobID") & ")"
rs.MoveNext
Wend
Is there an alternate way of doing this?