Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIF with an expression in criteria box 1

Status
Not open for further replies.

scottshiv

MIS
Sep 13, 2002
47
0
0
US
My form lets the user select a specific funding source (FS) or a selected group. There is no specific FS = 060 (valid FS = 020, 055, 056, 057, and 58), so I used 060 to indicate that the user wants a selected group of funding sources. In the criteria box for FS I inserted:

IIF([Forms]![Title]![FS] = "060",'Between "055" and "057"',([Forms]![Title]![FS])

This works great for a specific FS (False part of IIF). If the user selects 060, the query runs but no records are returned. I have tried In(....) and a bunch of OR's. Nothing works. Some how I think it is getting hung up on an operater being in the expression.

 
Try get the "between" out of the IIf() where it belongs.

Between IIF([Forms]![Title]![FS] = "060","055" , [Forms]![Title]![FS]) and IIF([Forms]![Title]![FS] = "060", "057",[Forms]![Title]![FS])


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top