refer to form filter

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
 
T

Tom van Stiphout

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top