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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIf Statements that return all records 1

Status
Not open for further replies.

jaaret

Instructor
Jun 19, 2002
171
I have check boxes on a form that modify query search criteria. The field being quieried has one of two values: 'Yes' or 'No'. The check boxes on the form are for 'All' or 'Owner Occupied' (and a couple others). When 'Owner Occupied' is checked the query returns all records with the 'Yes' value. But when 'All' is checked the query returns zero records. What should I replace the '*' with in my IIf statement, below?

IIf([forms]![pfrmDataRefiner]![chkAll]=-1,'*',IIf([Forms]![pfrmDataRefiner]![chkOO]=-1,'Yes'))
 
IIf([Forms]![pfrmDataRefiner]![chkAll]=-1, [Owner Occupied], IIf([Forms]![pfrmDataRefiner]![chkOO]=-1,'Yes'))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Groovy! Thanks for the quick and accurate answer!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top