S
Sue Compelling
Hi
I was given the following code (via this forum) to remove the first empty
line if my client doesn't have a home telephone #. I works brilliantly - but
I now realise I have situations where a client will only have an email
address (or a mobile phone)and this gets presented with an empty row in the
report. I've tried multiple variations to the below though none give me the
result I need.
Hoping someone can help.
=Mid(IIf([HomePhone] Is Null,"",Chr(13) & Chr(10) &
Format([homephone],"""Home: (""@@) @@@-@@@@")) & IIf([WorkPhone] Is
Null,"",Chr(13) & Chr(10) & Format([workphone],"""Work: (""@@) @@@-@@@@")) &
(Chr(13) & Chr(10)+[workextension] & IIf([FaxNumber] Is Null,"",Chr(13) &
Chr(10) & Format([faxnumber],"""Fax: (""@@) @@@-@@@@")) & IIf([MobilePhone]
Is Null,"",Chr(13) & Chr(10) & Format([mobilephone],"""Mobile: (""@@@)
@@@-@@@@")) & IIf([EmailName] Is Null,"",Chr(13) & Chr(10)+"Email: " &
[EmailName])),3)
I was given the following code (via this forum) to remove the first empty
line if my client doesn't have a home telephone #. I works brilliantly - but
I now realise I have situations where a client will only have an email
address (or a mobile phone)and this gets presented with an empty row in the
report. I've tried multiple variations to the below though none give me the
result I need.
Hoping someone can help.
=Mid(IIf([HomePhone] Is Null,"",Chr(13) & Chr(10) &
Format([homephone],"""Home: (""@@) @@@-@@@@")) & IIf([WorkPhone] Is
Null,"",Chr(13) & Chr(10) & Format([workphone],"""Work: (""@@) @@@-@@@@")) &
(Chr(13) & Chr(10)+[workextension] & IIf([FaxNumber] Is Null,"",Chr(13) &
Chr(10) & Format([faxnumber],"""Fax: (""@@) @@@-@@@@")) & IIf([MobilePhone]
Is Null,"",Chr(13) & Chr(10) & Format([mobilephone],"""Mobile: (""@@@)
@@@-@@@@")) & IIf([EmailName] Is Null,"",Chr(13) & Chr(10)+"Email: " &
[EmailName])),3)