Nested if function in access

G

Greg

Can i use nested if in access? I am trying to put phone number into text
box. If there is no cell number i want to put home number, if both fields
are null i want to put work number. All 3 phone field are defined in Contact
form.Thanks
 
A

Andy Bailey

Greg

If your form is based on a query create an expression like:-

DN: IIf(IsNull([CellNo]),(IIf(IsNull([HomeNo]),[WorkNo],[HomeNo])),[CellNo])

Make the control source for your text box the name of the expression, in
this case, DN

Hope this helps.


Andy
 
Top