Taking records from a form

  • Thread starter Thread starter Steven
  • Start date Start date
S

Steven

I have a form where the record source takes about 30
seconds to process because it is doing a query that has a
criteria as Like *UsersInput* on about 4,000,000 records.
On the form I have a print preview button. After the form
has populated and I want a printout is there a way to pick
up the records from the form without having to reprocess
the query.

Thank you for your help.
 
Steven

If it takes a query to derive the recordset that the form uses, it will take
a query to derive the recordset that the report needs to use.

But if there will frequently be the need to print out the recordset, after
viewing it in the form, another approach would be to use the first query to
load a temporary table. By basing both the form and the report on that
temporary table (or on a query against it), you would incur the "cost" of
loading it once, not twice.

I'm also wondering if there might not be a way you could pre-query to limit
the number of rows that need to be searched with your "Like *xxxx*" query?
Are there any other fields on which you could search first? Are those
indexed?
 
Thanks for the response. The search basically has to be
an sweep of the entire file. I was hoping you can use the
recordset of the form to pass to the report instantly. I
will have to do what you are saying about a temp table.
That looks like the best solution.

Steven.
 
Back
Top