Using <= in an IIF Statement

  • Thread starter Thread starter Vinny P
  • Start date Start date
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!!
 
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
 
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
 
Back
Top