This is a continuation of a problem that Alex helped me with earlier (thanks Alex!). I have an organizational alumni report. My database has home & work phone numbers. The the report lists the work or home phone number but not both. I want an (H) to print if home phone is listed or a (W) to print if work. Before I had to narrow it down to just 1 phone number I had the code listed in with the mask for each field but now that will not do.
I tried a new field that will list the H or W code but my sql statement does not work. It says unmatched ,. I know there is a problem with me using a nested if.
=IIf(isnull([Work_Phone]), IIf(isnull([Home_Phone]), , ”(H)”),“(W)”)
pseudocode
if workphone is null
if homephone is null
do nothing
else
print (H)
else
print (W)
OR can my original statement used to print the phone numbers be changed to list the phone number with the correct code?
=Trim(IIf(IsNull([Work_Phone]),[Home_Phone],[Work_Phone]))
This is the last report in a long project. Thanks for you help!!
Christine
I tried a new field that will list the H or W code but my sql statement does not work. It says unmatched ,. I know there is a problem with me using a nested if.
=IIf(isnull([Work_Phone]), IIf(isnull([Home_Phone]), , ”(H)”),“(W)”)
pseudocode
if workphone is null
if homephone is null
do nothing
else
print (H)
else
print (W)
OR can my original statement used to print the phone numbers be changed to list the phone number with the correct code?
=Trim(IIf(IsNull([Work_Phone]),[Home_Phone],[Work_Phone]))
This is the last report in a long project. Thanks for you help!!
Christine