Help with Nesting

C

Crime Inv

I'm using the following code behind a text box in order to have a label display
on a form when a condition is met on a subform.

=IIf((DLookUp("coc_seq_nbr","tbl_coc_tracking","([coc_in_date] is null) AND
([coc_subfrm_barcode] = " & [coc_barcode_nbr] & ")")),Null,"EVIDENCE OUT OF
CUSTODY")

I would also like to add a condition where field [coc_purpose] is equal to
"discovery".

I was told I could "nest" the additional condition into the statment, but I
have no clue how to do it.

Any help would be appreciated. Thanks. Dave
 
M

Mike Painter

Crime Inv said:
I'm using the following code behind a text box in order to have a label display
on a form when a condition is met on a subform.

=IIf((DLookUp("coc_seq_nbr","tbl_coc_tracking","([coc_in_date] is null) AND
([coc_subfrm_barcode] = " & [coc_barcode_nbr] & ")")),Null,"EVIDENCE OUT OF
CUSTODY")

I would also like to add a condition where field [coc_purpose] is equal to
"discovery".

I was told I could "nest" the additional condition into the statment, but I
have no clue how to do it.

Any help would be appreciated. Thanks. Dave


IIF( something, true, false)
IIF( something, true, IIF( somethingelse, true, false))
is the basic idea.
Just plug a complete IIF in the right spot.
I usually try to avoid more than one and try to make sure the "sub" IIF
works, then paste it in.
 
Top