SELECT query to show records for 2 parameter values

  • Thread starter Thread starter MES via AccessMonster.com
  • Start date Start date
M

MES via AccessMonster.com

I am trying to build a select query where if I select one value for a field
to also include another. I have a form from which I get my value. For
example, if I select on my form to show all records for course # 112, also
list all records for course # 111. If the value is not 112, then I want to
pull records for both 105 and 106. I tried the following IIf statement, but
when I try show both course #'s, nothing is returned:

IIf([Forms]![Courses - Select3a]![Course]=112,112 or 111,105 or 106)

Does anyone know what I am doing wrong? Any help would be greatly
appreciated. Thanks in advance.
 
Try this --
IIf([Forms]![Courses - Select3a]![Course]=112,111,105) Or
IIf([Forms]![Courses - Select3a]![Course]=112,112,106)
 

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