A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Adding a return in an expression builder.



 
 
Thread Tools Display Modes
  #1  
Old June 25th, 2008, 11:14 AM posted to microsoft.public.access.forms
emc
external usenet poster
 
Posts: 34
Default Adding a return in an expression builder.

Apologies, I placed this in the reports section by mistake.

I have the following code in an expression builder in a form:

=Trim([Prefix] & (" "+[First Name]) & (" "+[Middle Name]) & (" "+[Surname])
& (" "+[Name5]) & (" "+[Name6]) & (" "+[Name7]))

Until recently it was fine for it all to be on the one line. Now it is
required that there is a return placed between the names and addresses. I
noticed on a previous thread that Chr(13) & Chr(10) be used on an IIF
expression. I've tried it on my epxression but it doesn't seem to work or
perhaps I'm doing something wrong.

Any help on this topic would be much appreciated.

emc

  #2  
Old June 25th, 2008, 11:42 AM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Adding a return in an expression builder.

Chr(13) & Chr(10) should give you a new line wherever it's used. How did you
attempt to use it?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"emc" wrote in message
...
Apologies, I placed this in the reports section by mistake.

I have the following code in an expression builder in a form:

=Trim([Prefix] & (" "+[First Name]) & (" "+[Middle Name]) & ("
"+[Surname])
& (" "+[Name5]) & (" "+[Name6]) & (" "+[Name7]))

Until recently it was fine for it all to be on the one line. Now it is
required that there is a return placed between the names and addresses. I
noticed on a previous thread that Chr(13) & Chr(10) be used on an IIF
expression. I've tried it on my epxression but it doesn't seem to work or
perhaps I'm doing something wrong.

Any help on this topic would be much appreciated.

emc



  #3  
Old June 25th, 2008, 12:31 PM posted to microsoft.public.access.forms
emc
external usenet poster
 
Posts: 34
Default Adding a return in an expression builder.

In between, ie

=Trim([Prefix] Chr(13) & Chr(10) (" "+[First Name])...

"Douglas J. Steele" wrote:

Chr(13) & Chr(10) should give you a new line wherever it's used. How did you
attempt to use it?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"emc" wrote in message
...
Apologies, I placed this in the reports section by mistake.

I have the following code in an expression builder in a form:

=Trim([Prefix] & (" "+[First Name]) & (" "+[Middle Name]) & ("
"+[Surname])
& (" "+[Name5]) & (" "+[Name6]) & (" "+[Name7]))

Until recently it was fine for it all to be on the one line. Now it is
required that there is a return placed between the names and addresses. I
noticed on a previous thread that Chr(13) & Chr(10) be used on an IIF
expression. I've tried it on my epxression but it doesn't seem to work or
perhaps I'm doing something wrong.

Any help on this topic would be much appreciated.

emc




  #4  
Old June 25th, 2008, 12:46 PM posted to microsoft.public.access.forms
emc
external usenet poster
 
Posts: 34
Default Adding a return in an expression builder.

Doug,

I've managed to sort it. I did not have a closing parenthisis.

Many thanks.

emc

"Douglas J. Steele" wrote:

Chr(13) & Chr(10) should give you a new line wherever it's used. How did you
attempt to use it?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"emc" wrote in message
...
Apologies, I placed this in the reports section by mistake.

I have the following code in an expression builder in a form:

=Trim([Prefix] & (" "+[First Name]) & (" "+[Middle Name]) & ("
"+[Surname])
& (" "+[Name5]) & (" "+[Name6]) & (" "+[Name7]))

Until recently it was fine for it all to be on the one line. Now it is
required that there is a return placed between the names and addresses. I
noticed on a previous thread that Chr(13) & Chr(10) be used on an IIF
expression. I've tried it on my epxression but it doesn't seem to work or
perhaps I'm doing something wrong.

Any help on this topic would be much appreciated.

emc




  #5  
Old June 25th, 2008, 12:52 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Adding a return in an expression builder.

Glad you solved it. You were actually missing a couple of ampersands in what
you posted.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"emc" wrote in message
...
Doug,

I've managed to sort it. I did not have a closing parenthisis.

Many thanks.

emc

"Douglas J. Steele" wrote:

Chr(13) & Chr(10) should give you a new line wherever it's used. How did
you
attempt to use it?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"emc" wrote in message
...
Apologies, I placed this in the reports section by mistake.

I have the following code in an expression builder in a form:

=Trim([Prefix] & (" "+[First Name]) & (" "+[Middle Name]) & ("
"+[Surname])
& (" "+[Name5]) & (" "+[Name6]) & (" "+[Name7]))

Until recently it was fine for it all to be on the one line. Now it is
required that there is a return placed between the names and addresses.
I
noticed on a previous thread that Chr(13) & Chr(10) be used on an IIF
expression. I've tried it on my epxression but it doesn't seem to work
or
perhaps I'm doing something wrong.

Any help on this topic would be much appreciated.

emc






  #6  
Old June 25th, 2008, 01:08 PM posted to microsoft.public.access.forms
emc
external usenet poster
 
Posts: 34
Default Adding a return in an expression builder.

I noticed that also. Knowing I was on the right track made me play about
with it for a while to get it right.

Thanks again.

emc

"Douglas J. Steele" wrote:

Glad you solved it. You were actually missing a couple of ampersands in what
you posted.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"emc" wrote in message
...
Doug,

I've managed to sort it. I did not have a closing parenthisis.

Many thanks.

emc

"Douglas J. Steele" wrote:

Chr(13) & Chr(10) should give you a new line wherever it's used. How did
you
attempt to use it?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"emc" wrote in message
...
Apologies, I placed this in the reports section by mistake.

I have the following code in an expression builder in a form:

=Trim([Prefix] & (" "+[First Name]) & (" "+[Middle Name]) & ("
"+[Surname])
& (" "+[Name5]) & (" "+[Name6]) & (" "+[Name7]))

Until recently it was fine for it all to be on the one line. Now it is
required that there is a return placed between the names and addresses.
I
noticed on a previous thread that Chr(13) & Chr(10) be used on an IIF
expression. I've tried it on my epxression but it doesn't seem to work
or
perhaps I'm doing something wrong.

Any help on this topic would be much appreciated.

emc







 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.