Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deselecting A Row In A Listbox

Status
Not open for further replies.

boblovesyousomuch

Programmer
Dec 2, 2003
27
GB
hi,

I have two list boxes when one is pressed it filters the other. In the first list box (listFiles) you can extended multiselect. In the second (listPaymentBreak) there is no multiselect. When I have numerous files and select one in the second listbox a graph displays according to the results. Therefore the second listbox has a ItemsSelected.Count of 1. When I select different records in the first listbox the data changes in the second but the ItemsSelected.Count still = 1 if the file I previously selected is still present.

Basically then the last item I selected in the second listbox always stays selected how can i deselect it?

i tried this everytime there is a file change (onclick event on listFile) but it won't have it:

Code:
For intCurrentRow = 0 To listPaymentbreak- 1
listPaymentbreak.Selected(intCurrentRow) =0
Next intCurrentRow
[code]

Cheers

Carl
 
try to refresh the listbox

listbox.refresh

or try
listbox.requery
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top