refer to form filter

  • Thread starter Thread starter anna_717717
  • Start date Start date
A

anna_717717

Hi All,

I've got a form which is based on a query. I filter the data on the form.
How can I create a query which will use the form filter as the WHERE criteria?

I've started with :
SELECT qryPSetFinalAndBatchResults.*
FROM qryPSetFinalAndBatchResults
WHERE [Forms]![frmPSetFinalAndBatchResults].[Filter]

What do i need to change?

thanks
any help much appreciated
 
On Tue, 21 Jul 2009 06:32:04 -0700, anna_717717

That is not simple in the general case, because the filter may use
hidden temporary queries (name starts with ~) to accomplish its goal.
So this is what I do: I write the primary-key values to a new table
(using some DAO code to loop over the RecordsetClone), and I inner
join with that table.

-Tom.
Microsoft Access MVP
 
Back
Top