Get Criteria from a Table??

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi All,

Instead of having to type multiple criteria into the QBE grid is it possible
to enter the name of a field in a table that contains the relevant
criteria??

Regards.
Bill
 
Field name is the usual way to enter criteria, but your question reveals open
questions. What are you trying to do? What does your SQL statement look like
so far?

Sam
 
Ok, imagine that I want to query a table for certain names of people and
those name exist in a table (or can be generated in a query). Rather than
have to type all the names in a vertical column in the QBE grid I want to
enter the name of the table (or query) that generates the criterioa.

Has this helped??

Cheers.
Bill
 
You need to have a second field to check off which records are to be used for
the criteria.
Add the criteria table to your query in design view without joining. In the
criteria block of the field enter [YourCriteriaTableName].[CriteriaField]

Bring down the second field - I put an "X" for each record to be used - and
enter criteria for the second field.

This should do it for you.
 
If I understand you, you are saying you have a bunch of names in a table.
You want to find all the record sin a different table where the names match
that first table?

If so, that would be done by including both tables in your query, then
making a join between the two using the name field. In the join type,
select all records where the two entries are equal.
 
Back
Top