Results 1 to 4 of 4
  1. #1
    jle0003 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    60

    concatenated textbox value based on combo box selections

    I have a form with 3 combo boxes that have several options. On that same form, I have a textbox that I would like to autofill with the selected options from the combo boxes.

    For example:


    cbo1Options: 1;2;3
    cbo2Options: a;b;c
    cbo3Options: A;B;C

    Let's say the user selects 2, c, and A from the 3 combo boxes. I would like the textbox on that form to display: "2 c A".

    I tried doing a query, but that just autofilled the textbox with ALL the options available in the combo boxes, not the selected ones.

    Any help would be greatly appreciated!

    Thanks!

  2. #2
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    You can do an afterupdate after the third box is updated with code like below. Or you can do the update for all 3 in case you grab the wrong option by accident.

    Private Sub cbo3Options_AfterUpdate()
    Me.Yourtextbox = Me.cbo1Options & " " & Me.cbo2Options & " " & Me.cbo3Options

  3. #3
    jle0003 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    60
    That worked perfectly. Thank you so much!!

  4. #4
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    Glad I could help. Don't forget to mark the thread as solved.

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

Similar Threads

  1. Replies: 8
    Last Post: 03-19-2012, 08:50 PM
  2. Replies: 7
    Last Post: 01-26-2012, 11:57 AM
  3. Replies: 2
    Last Post: 05-27-2011, 08:12 AM
  4. Replies: 1
    Last Post: 05-25-2011, 08:37 AM
  5. Replies: 2
    Last Post: 09-17-2010, 09:53 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