For a List Bow - How to make the selection "go away" when selecting something else

J

Jon A

I have two list boxes on a form, each of them tied to
tables. So they list the items in the tables.

When I first open the form neither of the list boxes has any
selection.

As soon as you click on one of the items in either list box
the selected row gets highlighted.

If you then click on an item in the other list box, that row
gets highlighted, but the other list box row is still
highlighted also. So now it looks like there are two items
selected, one from each list box, when really there is only
one - the last item that was clicked on.

I can't figure out how to "unhighlight" the item that was
first clicked on when I click on the second item.

Anyone know how to do this?
 
D

Douglas J. Steele

You'll have to put logic in the AfterUpdate event of both of the listboxes
to unselect the item in the other listbox.

Assuming your listbox is name lstA, you can unselect everything in it by
Me.lstA = Null
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top