Results 1 to 2 of 2
  1. #1
    Luke is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    72

    Arrow Combine Two Fields in a Query?

    I have a table that includes Contact information with the following fields:

    "EntityName, Contact1First, Contact1Last, C1Phone, C1Cell, C1Email, Contact2First, Contact2Last, C2Phone, C2Cell, C2Email""

    I have created a query that uses expressions to combine the first and last names of Contact 1 and 2:
    "Contact1: ([Contact1Last] & (", "+[Contact1First]))"
    "Contact2: ([Contact2Last] & (", "+[Contact2First]))"

    I want to create a query with an expression that will create a new field that combines both the Contact 1 and Contact 2 expressions. This is what it looks like now:

    Contact1...........Contact2
    Smith, John........Honan, Luke
    Williams, Jim.......Sullivan, Pat

    I want it to look like this:

    Expression1
    Honan, Luke
    Smith, John


    Sullivan, Pat
    Williams, Jim

    Does anyone know hwo I can do this? Thanks.

    -Luke

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    SELECT Contact1 FROM tblEntity
    UNION
    SELECT Contact2 FROM tblEntity

    Also, it's up to you but I try to get away from using + in my concatenations. Try:
    Contact1: [Contact1Last] & ", " & [Contact1First]

    The + works well enough for strings but you can run into issues when concatenating numbers with +, Access will add them together instead.

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

Similar Threads

  1. combine two fields into one
    By kbremner in forum Programming
    Replies: 1
    Last Post: 10-29-2010, 07:40 AM
  2. Combine two fields, Null fields involved
    By yes sir in forum Access
    Replies: 9
    Last Post: 10-03-2010, 09:20 AM
  3. Combine First and Last name fields for Report
    By yes sir in forum Reports
    Replies: 32
    Last Post: 08-31-2010, 07:31 PM
  4. Combine one item fields in one field
    By romadm in forum Reports
    Replies: 7
    Last Post: 06-04-2010, 11:09 PM
  5. Combine fields into one
    By cotri in forum Forms
    Replies: 2
    Last Post: 03-04-2010, 02:42 PM

Tags for this Thread

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