Concatinating String

Posted on 2011-10-04
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?
Question by:gcgcit
    LVL 18

    Expert Comment

    [EmployeeFirstName].Value & " " & [EmployeeLastName].Value
    LVL 74

    Accepted Solution

    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.

    LVL 61

    Assisted Solution

    << "# Type" >>

    Verify that the textbox (or whatever) on your report does not have it's format properties set in a way that excludes text.

    Author Comment

    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.

    Author Comment

    correction: mbizup gave that tip

    Author Closing Comment

    Both provided information that helped solve the issue.
    LVL 74

    Expert Comment

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

    Expert Comment

    by:Jeffrey Coachman
    great, thanks



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Suggested Solutions

    Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now