Help! Unbound controls cause listbox to requery??

D

Dale Fye

Have not seen this before, in 10 years of Access use. Running A2003 on XP
Pro system.

I've got a subform on one of my forms that contains a listbox and several
other controls. The other controls (a combo and a text box) are unbound, and
are filled in based on the selection in the listbox and a value on the main
form.

I just modified the subform, so that I now have an option group which allows
the user to view the listbox filtered or unfiltered. The user selects an
option from the group and the listboxs RowSource is changed to the
appropriate query. What is supposed to happen is that when an item in the
listbox is selected, the combo box and textbox values are set using a
DLOOKUP( ) of different tables. This works OK.

Now for the strange part. When I select the filtered view of the listbox,
and move the cursor to either the combo box or the text box, nothing special
happens. However, when I change the RowSource of the listbox to the
unfiltered query, and move my cursor to either the combo or the textbox, the
listbox requeries. There is no code in the "SetFocus" event of either of
these controls, and this requery is occuring before the combo even drops
down. I also checked, and there is no code in the listboxes LostFocus event
either.

Any ideas?
 

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