Setting a Criterion (Criteria) In a Query...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Such as....Forms!frmMain!ForLast
....to be used in a Query....

If I use a Dropdown to select something like "R - Z"
and then populate an unbound Field named "ForLast"
with...

"R" Or "S" Or "T" Or "U" Or "V" Or "W" Or "X" Or "Y" Or "Z"

.....It will not work when setting that in...
ForLast = "R" Or "S" Or "T" Or "U" Or "V" Or "W" Or "X" Or "Y" Or "Z"

What is the best way to do this?

TIA - Bob
 
Where is this query headed?
Is it to filter records in a form?
Or to open a filtered report?

If so, see:
Use a multi-select list box to filter a report
at:
http://allenbrowne.com/ser-50.html
The code is identical to buid a Filter for your form.

If it must be done in the query, it is possible to craft a VBA function so
it returns True if there is a match. See Duane Hookom's 4th example on this
page:
http://www.access.hookom.net/Samples.htm
 
Allen - It's a Filtered Report.

I will read the references.

Thank you - Bob
 

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

Back
Top