On a form I have two list boxes.
The recordset for the second list box is based on the record selected in the first list box
When I select a record in the fist list box I want to clear any previously selected record in the second list box. I have tried the following:
But in the following scenario:
* I make a selection in list box 1 and a selection in list box 2
* Change the selection is list box 1
* Change the selection is list box 1 back to the one originally selected
The record in list box 2 is still highlighted!
How do I prevent this?
If the record selected in list box 1 changes, I never want to see a record selected in list box 2
Thanks in advance
The recordset for the second list box is based on the record selected in the first list box
When I select a record in the fist list box I want to clear any previously selected record in the second list box. I have tried the following:
Code:
Private Sub lstSupplier_Click()
[INDENT]For varItem = 0 To Me.lstCustomer.ListCount - 1
Me.lstCustomer.Selected(lrow:=varItem) = False
Next
Me.lstCustomer.Requery
[/INDENT]End Sub
But in the following scenario:
* I make a selection in list box 1 and a selection in list box 2
* Change the selection is list box 1
* Change the selection is list box 1 back to the one originally selected
The record in list box 2 is still highlighted!
How do I prevent this?
If the record selected in list box 1 changes, I never want to see a record selected in list box 2
Thanks in advance