Parameter query to select multiple child records on the same field

D

David Wetmore

I have a parent-child relationship where I want to be able to select all the children of the parent which meet multiple
criteria on one field. For example, for a parent name of "Big Creek" I want to be able to select all the child records
in which the map field contains "Dunsmore" AND those in which the map field contains "Cruso".

I have no trouble building a query which works for one child paramter value, "Cruso" for example, but the multiple
parameters on the same field have got me stumped.

Thanks, Dave
 
J

John W. Vinson

I have a parent-child relationship where I want to be able to select all the children of the parent which meet multiple
criteria on one field. For example, for a parent name of "Big Creek" I want to be able to select all the child records
in which the map field contains "Dunsmore" AND those in which the map field contains "Cruso".

I have no trouble building a query which works for one child paramter value, "Cruso" for example, but the multiple
parameters on the same field have got me stumped.

AND and OR look like the English language conjunctions, but they aren't: they
are actually Boolean algebra operators, just as + and - are arithmetic
operators.

You need to use OR in this case - because you want to retrieve the record if
it contains "Dunsmore", *or* if it contains "Cruso". AND would require that
each field contain BOTH values.

If you have trouble with this please post the SQL of your query.
 

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