Results 1 to 3 of 3
  1. #1
    keithshapiro is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    1

    How to update a field with the contents of two other fields

    I'm an excel user and in using excel I can take two fields and combine their data in one field. I've got about 6 database files with anywhere form 1000 to 3000 records that have already been prepared and imported into access database files .mdb and I realize that the firstname lastname fields need to also be combined into a contact field with both names. In Excel it's easy in access I'm a little lost. I was looking to an update query however I can't find instructions on what I'm trying to do.



    I wasn't sure how to search for this and my searches came up with very little. I may just be lost on what to search for so if someone can point me in the right direction, that would be great also!

    Any help would be appreciated as you guys always have great solutions.

    Thanks
    Keith

  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
    Typically you would leave them alone in the table (ie don't save the full name). In queries, forms or reports you concatenate them:

    [LastName] & ", " & [FirstName]

    You could update a field in the table, but I wouldn't.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    alfranco17 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    5
    Create a new query.
    Add the tables you need (query tools - design - show table).
    Click and drag the fields you need from the inserted table to the rows below.
    In a blank row, enter in the first row the code Paul gave you:

    Name: [LastName] & ", " & [FirstName]

    Coming from Excel, names can be confusing in Access. It might be easier for you if you use the builder (Query tools - Design - Query Setup - Builder). It is the equivalent to fx in Excel, though not quite the same.

    Good luck.

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

Similar Threads

  1. Missing data when adding contents of two fields
    By Jamescdawson in forum Forms
    Replies: 3
    Last Post: 03-08-2012, 09:39 AM
  2. Replies: 0
    Last Post: 03-29-2011, 04:11 PM
  3. Replies: 2
    Last Post: 02-25-2011, 03:56 PM
  4. VBA to update field contents...Error 91
    By jpkeller55 in forum Access
    Replies: 9
    Last Post: 10-11-2010, 07:52 PM
  5. Fields and their contents
    By Ham in forum Access
    Replies: 0
    Last Post: 02-06-2009, 07:34 AM

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