I have a form "Temp" with a text box called "txtTemp". I have a table called "Temp". I made a query called "qryTemp" which I am setting up with criteria from the Temp text box to filter the query.
My goal is when:
txtTemp = 1 -- show all the records
txtTemp = 2 -- show all records but not where the Status field = 6.
I've messed around with IIF and Like IIF in the criteria section of the query. in the criteria section on the Status field - I have:
Like IIf([Forms]![temp]![txtTemp]=1,"*",Not 6)
So when I enter in 1 in the txtbox - all the records show in the query - but when I change the value in the txtbox to another value say 2 - it does not see the Not 6 and returns no records. ( I want all records except where Status = 6)
So I'm stuck trying how to exclude a value in the false part of an IIF statement in the criteria.
Thanks for any help with this.