Problem with Query Criteria by IIF/Switch

  • Thread starter Thread starter LoboNetwork
  • Start date Start date
L

LoboNetwork

Hello,

I have the following switch in my criteria for a field in query. It
utilizes a form.

Switch([Forms]![Form1]![Frame1]=1,"",[Forms]![Form1]![Frame1]=2,"<>"N/A"",[Forms]![Form1]![Frame1]=3,"N/A")

If the Option Group is set to 3, The query filters correctly and shows all
records with an "N/A"

The problem is when the Option Group is set to 1 or 2

For 1, I want to sort by nothing... i.e. have no criteria (Using "" as I
have does not work)

For 2, I want to sort by everything that is not N/A (Using "<>"N/A"" does
not work..." Too many quotation marks?

Is there a way to get around both these?

Much appreciated,
Lobo
 
Back
Top