J
Jon Ley
I have a form with a listbox which has AfterUpdate code behind it. The code
collects data from various columns in the list box to populate other controls
on the form (ready for the user to edit) and sets the focus to another
control. The SetFocus command is called before the other controls have
finished being populated, but as soon as the SetFocus is called, the
ListIndex property of the ListBox is reset to -1 and I cannot retrieve any
further information from the ListBox columns (all return Null).
This code has worked fine for ages in Access 2002, but fails when I open the
same database in 2007. Also, if I break the code and set the focus back to
the ListBox, the ListIndex property is restored to its correct value and I
can continue to populate the remaining controls.
collects data from various columns in the list box to populate other controls
on the form (ready for the user to edit) and sets the focus to another
control. The SetFocus command is called before the other controls have
finished being populated, but as soon as the SetFocus is called, the
ListIndex property of the ListBox is reset to -1 and I cannot retrieve any
further information from the ListBox columns (all return Null).
This code has worked fine for ages in Access 2002, but fails when I open the
same database in 2007. Also, if I break the code and set the focus back to
the ListBox, the ListIndex property is restored to its correct value and I
can continue to populate the remaining controls.