S
Steve Jensen
I have a listbox that has a query rowsource. When I change a value in a
dropdown list, the listbox is requeried and displays a different set of rows.
There is no multiselect (you can only choose one item on the list). The
list is not bound to a field in the form recordsource.
The problem lies in trying to make the first row selected whenever the
listbox is requeried. I have tried several methods of setting row index 0 as
selected, with the same result. The control is left in a state which
prevents any further action on the form (you cannot requery the form, move
the focus to a different control, or basically do anything. Once you
manually click the first row in the listbox, you can do other things. The
error messages (2110, 2115, 2118 depending on what I am trying to do after
setting the list selection) all indicate that the control must be updated
before doing anything else. It says that the Before Update event or
Validation is preventing Access from performing the action (say, setting the
focus to a different control).
If I type me.(listname).undo in the immediate pane, I can move the focus,
but that also unselects row 0.
The whole thing is making me crazy. This control is unbound, so there is no
updating to do. There are no beforeupdate events, and no validation.
I have created a practice database with this scenario if anyone wants to
look at it. It is Access 2002.
dropdown list, the listbox is requeried and displays a different set of rows.
There is no multiselect (you can only choose one item on the list). The
list is not bound to a field in the form recordsource.
The problem lies in trying to make the first row selected whenever the
listbox is requeried. I have tried several methods of setting row index 0 as
selected, with the same result. The control is left in a state which
prevents any further action on the form (you cannot requery the form, move
the focus to a different control, or basically do anything. Once you
manually click the first row in the listbox, you can do other things. The
error messages (2110, 2115, 2118 depending on what I am trying to do after
setting the list selection) all indicate that the control must be updated
before doing anything else. It says that the Before Update event or
Validation is preventing Access from performing the action (say, setting the
focus to a different control).
If I type me.(listname).undo in the immediate pane, I can move the focus,
but that also unselects row 0.
The whole thing is making me crazy. This control is unbound, so there is no
updating to do. There are no beforeupdate events, and no validation.
I have created a practice database with this scenario if anyone wants to
look at it. It is Access 2002.