PDA

View Full Version : Modify the Multi Select property on a List Box



brorick
04-10-2005, 09:17 PM
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. http://www.mrexcel.com/board2/images/smiles/icon_cry.gif

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

Thank you in advance for your help.

Killian
04-11-2005, 08:35 AM
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..?

brorick
04-11-2005, 10:48 AM
Thank you for your response. Good idea. Have a great day.