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

    Populate textbox based on multiple selected checkboxes

    Thanks for taking a look at my question. I'm trying to create a database to track employee skillsets. I've created multiple checkboxes named after different skillsets each employee may have. I would like a text box under the set of check boxes that displays each skillset checked followed by a coma. For example: If I pull up "Joe" and I have checked, "SharePoint Developer" "Training Analyst" and "JAVA" I would want the text box to display: SharePoint Developer, Training Analyst, JAVA.



    For the 1st checkbox (JAVACheck) I have an event procedure that looks like this:

    Private Sub JAVACheck_Click()
    If Me.JAVACheck Then
    Me.Skillsets = "JAVA, "
    Else
    Me.Skillsets = ""
    End If
    End Sub


    and it will populate the text box (Skillsets), BUT if I check another box, JAVA is removed from the text box and replaced with the new skillset, even though JAVA is still checked. How can I make it so that it keeps adding to the text box vs removing the previous entry and adding the new?

    Thanks!

  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,518
    At its simplest:

    Me.Skillsets = Me.Skillsets & "JAVA, "

    I would probably have a function that examined all the checkboxes, and call it from the after update event of all of them.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    CKING is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    9
    Thanks! That worked~ The only problem now is that when I save and close the form, I open it back up, the check boxes are unchecked. When I re-check them the Skillset is listed again in the textbox causing a double entry, and if I uncheck any box, it clears the entire textbox out. Any suggestions? Sorry, I just learning

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

Similar Threads

  1. Replies: 1
    Last Post: 06-03-2013, 08:57 AM
  2. Filter Query based upon Checkboxes
    By olinms01 in forum Queries
    Replies: 2
    Last Post: 01-21-2013, 11:38 AM
  3. Replies: 4
    Last Post: 07-12-2011, 09:49 AM
  4. Filter records based on multiple checkboxes
    By kbremner in forum Forms
    Replies: 2
    Last Post: 01-18-2011, 10:59 AM
  5. Replies: 1
    Last Post: 01-10-2011, 12:25 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