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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|