Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Criteria based on combo box on a form 1

Status
Not open for further replies.

sjdk

Programmer
May 2, 2003
59
US
Ok, I have searched and searched and I just can not find the answer I am looking for....

I have a form with a combo box to choose if I want salary codes to print on my report. (Yes, No) In my query criteria I was trying to do is this:

like IIf(forms!frmOptions!cboSalaries = "yes", "*", ">0199")

When I run the report from the form, the true part of the expression works just fine, but the false part doesn't work. I know that the query is going to look for a value of ">0199" rather than looking for values greater than 0199. I have a feeling that this is something stupid that I am just missing, but I am just not seeing it.

Thanks in advance....
Steph
 
> '0199' OR [Forms]![frmOptions]![cboSalaries] = 'yes'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hmmm....not quite what I need...

If I choose "Yes" on the form, I want all codes to print, if I choose "No" on the form, I only want codes >0199 to print.

Thanks!
 
I thought the criteria I gave you was exactly that ...
 
Oh my gosh, am I ever thick today....a million pardons...you have provided me with EXACTLY what I was looking for....I was just trying to make it harder than it was. I can't thank you enough!!!

THANKS!!
Steph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top