Results 1 to 3 of 3
  1. #1
    udigold1 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Dec 2010
    Posts
    29

    Combining two fields into a third one in a Form

    Hi,

    I have table with 3 fields, where the combination of the first two fields, which are numeric, make up for the third field, which is a string.
    for example:
    SystemID SystemChannel ID_Channel
    1 2 1_2
    2 1 3_1
    2 2 2_2

    Field 3 is unique so it is the primary key, and since that, it cannot be a calculated field.

    How can I make a Form that just entering the first two fields will trigger the completion of the third one (I don't want to type it because fear of typing mistakes)?



    Thanks!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    on the form , put these events in:

    Code:
    sub SystemID_Afterupdate
    SetID
    end sub
    
    sub SystemChannel_AfterUpdate
    SetID
    end sub
    
    Sub SetID()
    ID_Channel =  SystemID & "_" & SystemChannel
    end sub


  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    In the after update event of the last one they enter:

    Me.ID_Channel = Me.SystemID & "_" & Me.SystemChannel
    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: 14
    Last Post: 07-22-2013, 12:39 PM
  2. Combining two fields Help
    By Juan4412 in forum Queries
    Replies: 11
    Last Post: 09-30-2012, 05:40 PM
  3. Combining Table Fields
    By jsimard in forum Access
    Replies: 2
    Last Post: 02-22-2011, 04:05 PM
  4. Combining fields - iif??
    By annaisakiwi in forum Queries
    Replies: 10
    Last Post: 12-22-2010, 07:49 PM
  5. Combining fields
    By cotri in forum Forms
    Replies: 2
    Last Post: 01-18-2010, 12:06 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