Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying text in a textbox

Status
Not open for further replies.

dmkennard2

Technical User
Jun 11, 2004
101
GB
Hi,
I have a form with address fields [Name] & [Address] etc.......

I can display these in a text field in a line, but would like to have each field on a separate line.
IE:
[Name]
[Address]

I have tried [Name] & chr$(13)& [Address] in the record source, but it ignores the return code.

Is this possible?

Thanks in advance.

Dazz
 
Dazz, I once asked a similar question and was given this code. The nz(trim bit removes any blank lines and the Chr (13)&Chr(10) forces a new line
Hope this helps you need to insert your own field names
Code:
=IIF(nz(trim([Account Name]),"")<>"",[Account Name] & Chr(13) & Chr(10)) 
& IIF(nz(trim([Address 1]),"") <> "",[Address 1] & Chr(13) & Chr(10)) 
& IIF(nz(trim([Address 2]),"") <> "",[Address 2] & Chr(13) & Chr(10)) 
& [Post Code]
 
Thanks, this works great.
I was nearly there!!

Dazz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top