Results 1 to 4 of 4
  1. #1
    JRINC is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    9

    Combining first and last name

    I have been given a table of employees to add to a database. First and last names are in seperate fields. I want to combine them on a form that I am using for entering expenses for each employee.



    I created a query with EmployeeID, FirstName, and Lastname. I used that query in a combo box. When I click on the drop-down, it shows both name fields, but only the First Name remains. Probablywould be good to show ID and name fields in final choice, since there could be two John Smiths for example.

    Thanks for the help! Using MS Access 2007.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    How about this as the combo row source:

    SELECT EmployeeID, FirstName & " " & Lastname AS FullName
    FROM TableName
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    JRINC is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    9
    Thanks very much

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The syntax error may be coming from the lack of a space before FROM. The FullName field is only created in the query, for display to the user.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combining fields - iif??
    By annaisakiwi in forum Queries
    Replies: 10
    Last Post: 12-22-2010, 07:49 PM
  2. Combining events
    By daddylongtoe in forum Access
    Replies: 4
    Last Post: 06-25-2010, 02:55 AM
  3. Combining fields
    By cotri in forum Forms
    Replies: 2
    Last Post: 01-18-2010, 12:06 PM
  4. combining 2 tables
    By psrs0810 in forum Access
    Replies: 11
    Last Post: 01-07-2010, 08:55 AM
  5. Help combining 3 tables
    By luscioussarita in forum Queries
    Replies: 1
    Last Post: 12-14-2005, 03:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums