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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping full name together

Status
Not open for further replies.

JohnSteven

Technical User
Oct 30, 2002
27
Hi All,

I have a field in a Report (we'll call the field "Copy To") that is based on an Expression in a Query Expr1: [FirstName] & " " & [LastName]. The problem I'm having is that when I preview the Report, if one of the names is of few letters "Joe Blow", the name "Joe" stays on the line above next to the last name of the previous person and throws off all the other names below it.(Properties for the Text box are set "To Grow")

Does anyone have an idea to keep the entire name together so that when the Text Box grows I get only one full name per line?????????
 
So what you are saying is you have more than one name in each textbox. Can you try something like this
Expr1:[FirstName] & " " & [LastName] & vbCrLf

see if that puts each name on a seperate line.

Pauo
 
Thanks for the reply Paul.
Tried your suggestion and all that happened was that it prompted me for info as if it were a Parameter Query
What I'm saying is that I have a text box in my Report that relies on an expression in a Query that concatenates the first and last name fields to obtain the Full name. The problem is that when I view the report, some of the names come out as follows;
John Harris
Ty Chen Joe
Fabiz
I have set the text box to grow and have made it as small as possible widthwise, but as I stated previously, if the name has too few characters in it (Ty Chen) then the next first name shares the same line as the previous full name.
Got any other ideas?????????
 
John, if you don't have more than one concatenated name per record in your report, I don't have clue what might be going on. What version are you running. How does the info look in the query? Is everything OK there.

Paul
 
Hi Paul,

I apologize for not properly conveying my problem. I should make things a little clearer. I have a database for writing interoffice memos. The following fields get their information from the same Query, Expr1: [FirstName] & " " & [LastName];
MemoFrom
MemoTo
CopyTo1
CopyTo2
CopyTo3
CopyTo4
This is the easiest way I know of to simplify the Memo composition.
The following fields;
CopyTo1
CopyTo2
CopyTo3
CopyTo4
make up make up the CC: field of the report and come from another Query with the Expression, Expr3: [CopyTo1] & " " & [CopyTo2] & " " & [CopyTo3] & " " & [CopyTo4]

So what I have are 4 concatenated fields that I have concatenated into one, but would like each of the 4 concatenated fields to have their own line in a report text box that is set to grow.

I realize this may sound far fetched, but other than the report field CC: being messed up, it works quite well. If necessary, I can e mail this DB to you for your review.

 
Hi John. A picture is worth a thousand words. Mail it to pbricker@attbi.com. I look at it as soon as I can.

Paul
 
Hi All,

To anyone who has been following this thread, Paul Bricker has come up with the solution and my hat is off to him.
Thanks again Paul.......

The solution is as follows;
Expr3: [CopyTo1] & Chr(13) & Chr(10) & [CopyTo2] & Chr(13) & Chr(10) & [CopyTo3] & Chr(13) & Chr(10) & [CopyTo4]

Hope this can help someone else also..........

JohnSteven
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top