How does Requerying Listboxes affect the Listbox’s selected item?

Joined
Sep 20, 2005
Messages
1
Reaction score
0
I have a list box with its Row Source set to a Table. I can click on an item in the list box to change the selection. If I then run some code that does a Requery on the list box, the selected item in the list box is preserved. However, if I use some VB code to select a new item:

Me!ListboxName.Selected(0) = True

then a subsequent Requery on the list box will cause the selected item to revert back to the last item that was clicked on. Why is this? I would like to be able to use VB code to make a selection that persists after a Requery is carried out on the list box.
 

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