G
Guest
I have a weird problem happening in an Access form. My form has several list
boxes on it. If the user selects something from List Box A it limits there
choices for List Box B. This code works fine. However if I put a line of
code to in List Box A to deselect any choices from List Box B screws things
up. It makes it fire the Click event for List Box A no matter what control
on the form is clicked. My code works perfect if I put it in a command
button. As soon as I put it in the click event for a list box it stops
working. Here is a simplified version of the code I'm using. If I take out
the last line of code it works fine. However I need that line to deselect
anything in the second list box. Any help would be greatly appreciated.
Private Sub lstCategory_Click()
lstFlavor.RowSource = "SELECTION CRITERIA"
lstFlavor.Requery
lstFlavor.Selected(lstFlavor.ListIndex) = False
End Sub
boxes on it. If the user selects something from List Box A it limits there
choices for List Box B. This code works fine. However if I put a line of
code to in List Box A to deselect any choices from List Box B screws things
up. It makes it fire the Click event for List Box A no matter what control
on the form is clicked. My code works perfect if I put it in a command
button. As soon as I put it in the click event for a list box it stops
working. Here is a simplified version of the code I'm using. If I take out
the last line of code it works fine. However I need that line to deselect
anything in the second list box. Any help would be greatly appreciated.
Private Sub lstCategory_Click()
lstFlavor.RowSource = "SELECTION CRITERIA"
lstFlavor.Requery
lstFlavor.Selected(lstFlavor.ListIndex) = False
End Sub