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)
 
Back
Top