D
Dee
I have input a formula to put in a carriage return in a
field; however, when there is no information, it produces
blank lines. I would like for it all to be together. I
tried to send a message through outlook express earlier,
but it didn't seem to appear, so I hope it doesn't somehow
end up here twice. First, I'll give you the formula I
used, then an example how it comes out:
Formula:
=IIf(IsNull([firstname]),"","" & [firstname]) & IIf(IsNull
([Last Name]),""," " & [Last Name]) & Chr(13) & Chr(10) &
[CHCompany] & IIf(IsNull([Division]),""," " & [Division])
& Chr(13) & Chr(10) & IIf(IsNull([Address]),"","" & Chr
(13) & Chr(10) & [Address]) & IIf(IsNull([Address2]),"",""
& Chr(13) & Chr(10) & [Address2]) & Chr(13) & Chr(10) & IIf
(IsNull([City]),"","" & [City]) & IIf(IsNull
([State]),"",", " & [State]) & IIf(IsNull([Zip]),""," " &
[Zip]) & IIf(IsNull([Country]),""," " & Chr(13) & Chr(10)
& [Country]) & Chr(13) & Chr(10) & IIf(IsNull
([Phone]),"","Phone: " & [phone]) & Chr(13) & Chr(10) & IIf
(IsNull([Fax]),"","Fax: " & [fax]) & Chr(13) & Chr(10) &
IIf(IsNull([mobile]),"","Mobile: " & [mobile]) & Chr(13)
& Chr(10) & IIf(IsNull([pager]),"","Pager: " & [pager]) &
Chr(13) & Chr(10) & IIf(IsNull([homephone]),"","Home
Phone: " & [homephone]) & Chr(13) & Chr(10) & IIf(IsNull
(),"","Email: " & [email])
Here's how it comes out (Example):
FirstName LastName
CHCompany Division
Address2
City, State Zip
Country
Phone: 111.111.1111
Fax: 111.111.1111
Email: [email protected]
The fields Address, Mobile, Pager, and Home Phone had no
data and it inputed blank lines (I suppose due to where I
put & Chr(13) & Chr(10)formula). Can anyone tell me how
to avoid this?? Hopefully tonight
. And is it
different in reports and forms, because I have this same
formula in a form and need to make sure it doesn't do the
same thing
.
Thanks!
Dee
field; however, when there is no information, it produces
blank lines. I would like for it all to be together. I
tried to send a message through outlook express earlier,
but it didn't seem to appear, so I hope it doesn't somehow
end up here twice. First, I'll give you the formula I
used, then an example how it comes out:
Formula:
=IIf(IsNull([firstname]),"","" & [firstname]) & IIf(IsNull
([Last Name]),""," " & [Last Name]) & Chr(13) & Chr(10) &
[CHCompany] & IIf(IsNull([Division]),""," " & [Division])
& Chr(13) & Chr(10) & IIf(IsNull([Address]),"","" & Chr
(13) & Chr(10) & [Address]) & IIf(IsNull([Address2]),"",""
& Chr(13) & Chr(10) & [Address2]) & Chr(13) & Chr(10) & IIf
(IsNull([City]),"","" & [City]) & IIf(IsNull
([State]),"",", " & [State]) & IIf(IsNull([Zip]),""," " &
[Zip]) & IIf(IsNull([Country]),""," " & Chr(13) & Chr(10)
& [Country]) & Chr(13) & Chr(10) & IIf(IsNull
([Phone]),"","Phone: " & [phone]) & Chr(13) & Chr(10) & IIf
(IsNull([Fax]),"","Fax: " & [fax]) & Chr(13) & Chr(10) &
IIf(IsNull([mobile]),"","Mobile: " & [mobile]) & Chr(13)
& Chr(10) & IIf(IsNull([pager]),"","Pager: " & [pager]) &
Chr(13) & Chr(10) & IIf(IsNull([homephone]),"","Home
Phone: " & [homephone]) & Chr(13) & Chr(10) & IIf(IsNull
(),"","Email: " & [email])
Here's how it comes out (Example):
FirstName LastName
CHCompany Division
Address2
City, State Zip
Country
Phone: 111.111.1111
Fax: 111.111.1111
Email: [email protected]
The fields Address, Mobile, Pager, and Home Phone had no
data and it inputed blank lines (I suppose due to where I
put & Chr(13) & Chr(10)formula). Can anyone tell me how
to avoid this?? Hopefully tonight
different in reports and forms, because I have this same
formula in a form and need to make sure it doesn't do the
same thing
Thanks!
Dee