View Full Version : Criteria from 2 Seperate Forms


David777
04-25-2002, 11:22 AM
Hi,

I have a query that recieves criteria from a form. I want to use the same query, but use criteria from a seperate form. Is there a way to have the criteria of a query ignore the reference to the form if the form is inactive?

I've tried the following, but still get prompted for a value.

Like IIf Forms![FormName].[Control],"", or IsNull[Forms]![FormName].[Control]

Thank you,

RichMorrison
04-25-2002, 12:46 PM
David,

You can create "property" procedures in Acc97 or Acc2K. Then you refer to a property "Get" function as the criteria in your query.

It is more work but does make queries independent of specific form names.

Short answer, hope it helps.

RichM

llkhoutx
04-25-2002, 11:32 PM
Use a hidden form to hold the cirteria, save values to that hidden form from the real form, then query using the field on the hidden form as the criteria.