Results 1 to 6 of 6
  1. #1
    gammaman is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    56

    Show Checkbox when listbox item is selected

    How can I show checkbox and the checkbox text, when a listbox item is selected (highlighted)

    This is what I am trying to play with.



    Code:
    If List1.Value = "abc" Then
         Me.Check2.Visible = True
         Me.Check4.Visible = True
         Me.Check6.Visible = True
    End If
    When I click the listbox item, the checkboxes do not display. On the form I have them defaulted to Visible = False.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    This code is in the listbox Click event?

    Are you sure the listbox value is "abc" and not a number ID? What is the listbox RowSource and what is the BoundColumn?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    gammaman is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    56
    I see. I just moved it. Now, which procedure would I use? BeforeUpdate, AfterUpdate, Click?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    Moved what where?

    I would use AfterUpdate.

    Do you want the checkboxes available if you open existing record? Do you navigate records on the form? Should the checkboxes be turned off when moving to another record that doesn't meet the criteria?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    gammaman is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    56
    I moved the code above to the ListBox Event. I originally had it outside. I do not navigate any records on the form. I have four checkboxes on the form. All I want to do is display checkboxes 1&2 if listbox item #1 is clicked and display checkboxes 3&4 if listbox item #2 is clicked.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    So this is resolved?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 5
    Last Post: 06-24-2015, 02:45 PM
  2. Replies: 1
    Last Post: 11-26-2014, 02:30 PM
  3. Replies: 7
    Last Post: 06-05-2012, 03:22 PM
  4. Combo box - Open at last item selected
    By mitchy1111 in forum Programming
    Replies: 2
    Last Post: 10-07-2011, 07:23 AM
  5. Replies: 7
    Last Post: 08-31-2011, 05:09 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