Using <= in an IIF Statement

V

Vinny P

I know the answer is right in front of my eyes, but its one of those days and
I have wasted too much time on it already..

I have a column within a table called Networth. I want the user to be able
to enter a number in a textbox on a form and return only records
<=[Networth]. But there is a catch, the textbox is optional. I have tried
several different IIF statements and I was not successful. I used the "*"
wildcard and was able to return all records as long the textbox was
blank(null), if a number was entered, no records were returned.

Here is an example of what I am trying to do:
Like IIF(forms!frmMaintMenu![Networth] is null, "*", <=
forms!frmMaintMenu![Networth])

Any help is EXTREMELY appreciated!!
 
M

Marshall Barton

Vinny said:
I know the answer is right in front of my eyes, but its one of those days and
I have wasted too much time on it already..

I have a column within a table called Networth. I want the user to be able
to enter a number in a textbox on a form and return only records
<=[Networth]. But there is a catch, the textbox is optional. I have tried
several different IIF statements and I was not successful. I used the "*"
wildcard and was able to return all records as long the textbox was
blank(null), if a number was entered, no records were returned.

Here is an example of what I am trying to do:
Like IIF(forms!frmMaintMenu![Networth] is null, "*", <=
forms!frmMaintMenu![Networth])


Close, but Like won't do it. Try this:

<=forms!frmMaintMenu![Networth] OR
forms!frmMaintMenu![Networth] is null
 
V

Vinny P

It Worked!! Thanks!!!

Marshall Barton said:
Vinny said:
I know the answer is right in front of my eyes, but its one of those days and
I have wasted too much time on it already..

I have a column within a table called Networth. I want the user to be able
to enter a number in a textbox on a form and return only records
<=[Networth]. But there is a catch, the textbox is optional. I have tried
several different IIF statements and I was not successful. I used the "*"
wildcard and was able to return all records as long the textbox was
blank(null), if a number was entered, no records were returned.

Here is an example of what I am trying to do:
Like IIF(forms!frmMaintMenu![Networth] is null, "*", <=
forms!frmMaintMenu![Networth])


Close, but Like won't do it. Try this:

<=forms!frmMaintMenu![Networth] OR
forms!frmMaintMenu![Networth] is null
 

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

Top