Results 1 to 3 of 3
  1. #1
    Trojnfn is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    46

    Check Box

    I have a form with a box containing a pullodown list of values. However, that will only allow me to select one value. For example, my form tracks meeting notes and who attended the meeting. I want a pulldown list of all the names and a checkbox next to each. If I check the name, I want it to display on my form and then eventually get inserted into the table. How do I set that up ?

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    If a meeting has many attendees then that describes a one-to-many relationship, so you should have a table related to your meeting table that holds the attendees. Typically, you would use a subform bound to that table to capture the attendees. If you do not want to use a subform, then the next best approach is to use a multi-select list box. You would not need the check boxes; the multiselect list box allows you to select via ctrl+Click. You will need code to loop through the items selected in the list box in order to append those attendees to the appropriate table.

  3. #3
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    To allow multiple item selection in a listbox, you need to set its Multi Select property to simple or extended. For your purposes, Simple should suffice. However, you cannot use a checkbox to indicate the selected lines; just click an entry in the listbox to select it - it will become highlighted. Click the entry again to de-select it.

    You will need VBA to process the checkbox entry list, something like this:

    Dim lineitem As Variant
    MsgBox Me!mylistbox.ItemsSelected.COUNT & " items selected" ' Just to verify the count - not required
    For Each lineitem In List10.ItemsSelected
    Debug.Print mylistbox.Column(1, lineitem) ' just to verify - remembering the column 1 is the second column in the listbox
    '
    ' process each selected line in the litbox as needed
    '
    Next

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

Similar Threads

  1. Replies: 1
    Last Post: 05-10-2012, 11:56 AM
  2. Check Box
    By BLD21 in forum Forms
    Replies: 1
    Last Post: 11-07-2011, 10:11 AM
  3. To check or Un-Check all Boxes in a form
    By devcon in forum Forms
    Replies: 7
    Last Post: 05-01-2010, 12:03 AM
  4. Check box
    By nashr1928 in forum Forms
    Replies: 5
    Last Post: 04-21-2010, 02:37 PM
  5. Check Box Value
    By mulefeathers in forum Programming
    Replies: 4
    Last Post: 10-09-2009, 08:31 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