iif in the criteria

I

inungh

I just wonder does Access query support iif in the criteria

I tried to put iif([forms]![myform]![mycheckbox], <>5, <5) in my
criteria for my field.

It seems the query does not return any records from when I ran the
query.


Are there any work around for this issue?

Your information is great appreciated,
 
B

bhicks11 via AccessMonster.com

What is your if function returning?

iif([forms]![myform]![mycheckbox]=true, <>5, <5)

Also, you are setting the criteria to "doesn't equal 5" or "is less than 5"
but if something is less than 5, it also doesn't equal 5???

Bonnie
http://www.dataplus-svc.com
I just wonder does Access query support iif in the criteria

I tried to put iif([forms]![myform]![mycheckbox], <>5, <5) in my
criteria for my field.

It seems the query does not return any records from when I ran the
query.

Are there any work around for this issue?

Your information is great appreciated,
 
A

Allen Browne

Are you trying to ask the query to show values other than 5 when the box is
checked, or otherwise to show values less than 5?

If so, switch the query to SQL View.
Locate the WHERE clause.
Try something like this:

WHERE IIf(([forms]![myform]![mycheckbox], [MyField] <>5, [MyField] < 5)
 
I

inungh

Are you trying to ask the query to show values other than 5 when the box is
checked, or otherwise to show values less than 5?

If so, switch the query to SQL View.
Locate the WHERE clause.
Try something like this:

WHERE IIf(([forms]![myform]![mycheckbox], [MyField] <>5, [MyField] < 5)

--
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.




I just wonder does Access query support iif in the criteria
I tried to put iif([forms]![myform]![mycheckbox], <>5, <5) in my
criteria for my field.
It seems the query does not return any records from when I ran the
query.- Hide quoted text -

- Show quoted text -

Thanks millions, it works,
 

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

Similar Threads


Top