Carriage report in text box

dan-cat

Registered User.
Local time
Today, 13:19
Joined
Jun 2, 2002
Messages
3,415
Hello,

Is there anyway of forcing a carriage return in a textbox within a report?

So instead of having say 6 seperate fields within the report to detail an address. ie [CompName],[Add1],[Add2],[Town],[County],[PostCode] - you could have one text-box within the report whose control source would look something like:

=[CompName] & vbCrLf & [Add1] & vbCrLf & [Add2]..........

Thankyou

Dan
 
Dan,

Put it in your query like:

NewAddr: F1 & vbCrLf & F2 & vbCrLf ...

Then just reference the new field in your report.

There have been a few threads here about using an Iif statement
to construct this in a query to take care of when the second
line is blank.

Wayne
 
Wayne,

Have given that a go (see attached) but the record source is treating vbCrLf as a field instead of a formatting command :confused:
 

Attachments

Dan,

Sorry about that, it "should" have worked.

NameAddr: [Company] & Chr(10) & Chr(13) & [Address1]

Works (it equals vbCrLf). Maybe a reference problem, or maybe
just a tough Monday for me.

Try the above for now.

Wayne
 
oops it doesn't like that either :( I'm just getting little squares where the carriage return should be.
 

Attachments

As the control source of an unbound texbox on your report something like
=[FirstName] & " " & [LastName] & Chr(13) & Chr(10) & [Address1] & Chr(13) & Chr(10) & IIf(IsNull([City]),"",[City] & Chr(13) & Chr(10)) & [PostalCode]
 

Users who are viewing this thread

Back
Top Bottom