S
Sue Compelling
Hi
I have an expression in my query that combines a number of fields for
Coordinators. In most instances the coordinator contact details that get
returned will not always have every type of contact number displayed (ie
Work, Home and Mobile) so in those instances I don't want the H:, W: or M: to
be shown.
My original expression which was doing this is:
Combined: [Firstname] & " " & [Lastname] & ", " & [ContactType] & " H: "
& Format([homephone],"(00) 000-0000") & " W: " & Format([workphone],"(00)
000-0000") & ", " & [workextension] & " M: " & Format([mobilephone],"(000)
000-0000")
I've tried using the Nz function in all sorts of iterations though error
after error comes back no matter how I contrive it. Here's my attempt - HELP
please!!!
Combined: [Firstname] & " " & [Lastname] & ", " & [ContactType] &
IIf(Nz(homephone),
" ",
(" H:†& Format([homephone],"(00) 000-0000"))) &
IIf(Nz(workphone),
" ",
(" W:†& Format([workphone],"(00) 000-0000") & ", " & [workextension])) &
IIf(Nz(mobilephone),
" ",
(" M:†& Format([mobilephone],"(000) 000-0000")))
TIA
I have an expression in my query that combines a number of fields for
Coordinators. In most instances the coordinator contact details that get
returned will not always have every type of contact number displayed (ie
Work, Home and Mobile) so in those instances I don't want the H:, W: or M: to
be shown.
My original expression which was doing this is:
Combined: [Firstname] & " " & [Lastname] & ", " & [ContactType] & " H: "
& Format([homephone],"(00) 000-0000") & " W: " & Format([workphone],"(00)
000-0000") & ", " & [workextension] & " M: " & Format([mobilephone],"(000)
000-0000")
I've tried using the Nz function in all sorts of iterations though error
after error comes back no matter how I contrive it. Here's my attempt - HELP
please!!!
Combined: [Firstname] & " " & [Lastname] & ", " & [ContactType] &
IIf(Nz(homephone),
" ",
(" H:†& Format([homephone],"(00) 000-0000"))) &
IIf(Nz(workphone),
" ",
(" W:†& Format([workphone],"(00) 000-0000") & ", " & [workextension])) &
IIf(Nz(mobilephone),
" ",
(" M:†& Format([mobilephone],"(000) 000-0000")))
TIA