?
Solved

Concatinating String

Posted on 2011-10-04
9
Medium Priority
?
263 Views
Last Modified: 2012-05-12
I have a report, I want it to display the First and Last Name of an employee concatinated into one field.

I had the controlsource of the field set to this:

=[EmployeeFirstName] & " " & [EmployeeLastName]

On the report, it's displaying "# Type" in that field instead of the name.  What's the most effecient way to achieve what I want done?
0
Comment
Question by:gcgcit
8 Comments
 
LVL 18

Expert Comment

by:lludden
ID: 36909786
Try
[EmployeeFirstName].Value & " " & [EmployeeLastName].Value
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 1000 total points
ID: 36910431
What I like to do is to concatenate the names in the form's recordsource.
This way you can simply add it to the report like the other fields.

SELECT Fld1, Fld2, Fld3, [EmployeeFirstName] & " " & [EmployeeLastName] AS FullName
FROM Yourtable


In your case, check the spelling of your Fields to be sure.
Also make sure you are doing this in the control Source property of a Textbox.

Finally, if you are doing this via code, you must open the Report in Print Preview in order for this code to run.

JeffCoachman
0
 
LVL 61

Assisted Solution

by:mbizup
mbizup earned 1000 total points
ID: 36910850
<< "# Type" >>

Verify that the textbox (or whatever) on your report does not have it's format properties set in a way that excludes text.
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 

Author Comment

by:gcgcit
ID: 36910910
boag2000: Just realized it was a look-up not textbox control.  I deleted the control and added a textbox to make sure no weird constraints were on it and realized it wasn't a textbox afterall.  Thanks for that tip.
0
 

Author Comment

by:gcgcit
ID: 36910917
correction: mbizup gave that tip
0
 

Author Closing Comment

by:gcgcit
ID: 36910919
Both provided information that helped solve the issue.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36910948
^
Yeah, I was wondering about that as well, ...I have never seen this error...?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36910963
great, thanks

;-)

Jeff
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question