Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / October 2005

Tip: Looking for answers? Try searching our database.

Text Box Line Control?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Habercom - 20 Oct 2005 19:53 GMT
I am going crazy with this text box.  I want it to insert a CR/LF only when
the line has text, but it does it every time.  Why?  I need help!

=[DonName] & Chr(13) & Chr(10) &
IIf(IsNull([DonAddr1]),"",[DonAddr1] & Chr(13) & Chr(10)) &
IIf(IsNull([DonAddr2]),"",[DonAddr2] & Chr(13) & Chr(10)) &
IIf(IsNull([DonAddr3]),"",[DonAddr3] & Chr(13) & Chr(10)) &
IIf(IsNull([DonAddr4]),"",[DonAddr4] & Chr(13) & Chr(10)) &
IIf(IsNull([DonAddr5]),"",[DonAddr5] & Chr(13) & Chr(10)) &
IIf(IsNull([DonAddr6]),"",[DonAddr6] & Chr(13) & Chr(10)) &
"Dear " & [DonSalPres] & ":"

Signature

David Habercom
University of Tennessee

David Habercom - 20 Oct 2005 20:09 GMT
I found the answer: a new update method I am using inserts a space on every
empty address line.  The blank lines are not really null.  THAT I can fix.  
Thanks.
Signature

David Habercom
University of Tennessee

> I am going crazy with this text box.  I want it to insert a CR/LF only when
> the line has text, but it does it every time.  Why?  I need help!
[quoted text clipped - 7 lines]
> IIf(IsNull([DonAddr6]),"",[DonAddr6] & Chr(13) & Chr(10)) &
> "Dear " & [DonSalPres] & ":"
Marshall Barton - 20 Oct 2005 20:15 GMT
>I am going crazy with this text box.  I want it to insert a CR/LF only when
>the line has text, but it does it every time.  Why?  I need help!
[quoted text clipped - 7 lines]
>IIf(IsNull([DonAddr6]),"",[DonAddr6] & Chr(13) & Chr(10)) &
>"Dear " & [DonSalPres] & ":"

Maybe the addr field aren't really Null?  If they might be a
zero length string, then use:

IIf(Nz([DonAddr1],"")=""), . . .

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.