Results 1 to 2 of 2
  1. #1
    BLITZ79 is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    1

    How to concatenate values of two form fields to set value of third form field

    I have a very simple Access form that will be used to insert records into a SQL database.

    First field is 'pvLot' and it is a Combo Box whose values are driven by a separate pvLots SQL table.

    Second field 'waferID_slot' is a varchar(3) (in the SQL database) and common values would be '001', '002', '003', etc...

    For the third field 'pvCellSerial', I need the form to INSERT to the SQL database a concatenation in a sense. The value in this field should be [pvLot]&"-"&[waferID_slot]. Using the 'Control source' property I can get that string to display on the form, but it appears to be as read-only property as the SQL insert fails as the third column is NULL upon insert.



    Novice at SQL development and have used Access for several years but primarily for complex ad-hoc queries, so little experience with forms.

  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
    It's not the kind of thing I would save, but if you must, it's basically a calculated field:

    http://allenbrowne.com/casu-14.html
    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. Replies: 5
    Last Post: 03-23-2011, 02:28 PM
  2. Replies: 0
    Last Post: 03-08-2011, 05:56 PM
  3. Combine the values of two fields on a form
    By nyteowl in forum Access
    Replies: 4
    Last Post: 10-15-2010, 11:16 AM
  4. Replies: 3
    Last Post: 10-16-2009, 09:27 AM
  5. Concatenate two fields (text & number) for key field
    By Larry Elfenbein in forum Forms
    Replies: 2
    Last Post: 11-10-2005, 07:45 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