tranchemontaigne
Registered User.
- Local time
- Today, 15:49
- Joined
- Aug 12, 2008
- Messages
- 203


I just quite cannot figure it out. I have a form with a radio button that stores the value of 0 and -1
This radio button indicates whether capital expenses should be included in the query output.
If the radio button [opt_w_Cap_Exp] = -1 then only records where field t04_Resource_Allocation.[t04_Capital_Expenditure] stores a value of -1 should appear in the output.
If the radio button [opt_w_Cap_Exp] = 0 then all records should appear in the output.
SELECT
t04_Resource_Allocation.t04_Resource_Allocation_ID, t04_Resource_Allocation.[t04_Capital_Expenditure] AS Expr1
FROM t04_Resource_Allocation
WHERE
(
(
(t04_Resource_Allocation.[t04_Capital_Expenditure])=
IIf([Forms]![frmMainMenu]![frmSubform].[Form]![opt_w_Cap_Exp].[value]=-1,(t04_Resource_Allocation.[t04_Capital_Expenditure])<2,0)
)
)
;
The problem is that regardless of whether I write the IIF statement with the 2nd argument as
Like "*"
In(0,-1)
<2
isnull(...) = false
isnumeric(...) = true
I cannot figure out how to conditionally show all records in the output.
Any help would be appreciated.
Environment: MS Access 2000 SP3 on Windows XP
________
Alfredo Ferrari Specifications
Last edited: