Consulting

Results 1 to 3 of 3

Thread: Modify the Multi Select property on a List Box

  1. #1

    Modify the Multi Select property on a List Box

    Hello. I attempted to attach the following code to a check box. I want to give the user the option to select individual items from a list box or if they click on the check box, they will be permitted to select multiple items. Does anyone know why this won't work properly.

    [VBA] Private Sub mselect_AfterUpdate()

    'If the user clicks on the check box then
    If Me.mselect = True Then

    'the forms list box titled "LstFindings" MultiSelect property will be set to Simple (1)
    Me.LstFindings.MultiSelect = 1
    Else

    'or set to None (0)
    Me.LstFindings.MultiSelect = 0

    End If
    End Sub[/VBA]

    Thank you in advance for your help.

  2. #2
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    My understanding is that the Multiselect property of an Access list box can only be set in Design view. Nice idea though.
    Maybe you could layer two alternate listboxes then show the appropriate one..?
    K :-)

  3. #3
    Thank you for your response. Good idea. Have a great day.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •