IIf(isnull) across multiple cascading combos

Steindawg

New member
Local time
Today, 11:30
Joined
Jul 24, 2002
Messages
9
I have three levels of cascading combos Division>Admin>Department and an independent combo called node. Now I want the query to pull all the values if nothing is selected in the combo box. The node field is the only one that is working properly. My code is as follows


IIf(IsNull([Forms]![Main]![CboDiv]),[PFM]![Division],[Forms]![Main]![CboDiv])


IIf(IsNull([Forms]![Main]![CboAdmin]),[PFM]![Admin],[Forms]![Main]![CboAdmin])


IIf(IsNull([Forms]![Main]![CboDept]),[Journal Detail]![Deptid],[Forms]![Main]![CboDept])


IIf(IsNull([Forms]![Main]![CboNode]),[PFM Node],[Forms]![Main]![CboNode])


It doesn't prompt me for a value on any of the boxes like it does when it doesn't understand the statement, the query simply comes back blank until I populate the Division, Admin, and Dept fields. The PFM and Journal Detail Fields are linked by DeptID.....Thanks in advance for any ideas....
 
When I look under the help for the IIF statement it says they can be used on forms or reports...Do they even function in criteria lines? If not why is the node portion functioning properly?
 

Users who are viewing this thread

Back
Top Bottom