I am trying to use the value of a table as criteria for a yes/no field in a query. It works correctly for the Yes (-1) and No (0) values. My problem is that if the value of the field is All only the -1 records are returned int he results. I'd like to have the All value return both 0 and -1 records.
Any help will be greatly appreciated. Thanks, Kopy
===========================================================
IIf(DLookUp("PDDNOS","tblQBF")="No",0,IIf(DLookUp("PDDNOS","tblQBF")="Yes",-1,IIf(DLookUp("PDDNOS","tblQBF")="All",([tblPreScreeningInfo].[PDDNOS])=0 Or ([tblPreScreeningInfo].[PDDNOS])=-1)))
Any help will be greatly appreciated. Thanks, Kopy
===========================================================
IIf(DLookUp("PDDNOS","tblQBF")="No",0,IIf(DLookUp("PDDNOS","tblQBF")="Yes",-1,IIf(DLookUp("PDDNOS","tblQBF")="All",([tblPreScreeningInfo].[PDDNOS])=0 Or ([tblPreScreeningInfo].[PDDNOS])=-1)))