J
JP
Running Access 2003 under XP Professional (problem also occurs w/ A2000
under XP Home).
My form has 2 listboxes: lbxCompanies and lbxDivisions. Both have
mutiselect = no
Clicking on a company in lbxCompanies dynamically requeries the Rowsource
for lbxDivisions so that only divisions of the selected company are showing.
This all works fine.
HOWEVER, lbxDivisions seems to "remember" which division was highlighted for
a given company, and re-highlights that division if I leave that company and
again come back to it.
For example, I click on Company A and then click on Division A2 (one of the
divisions of Company A). I thing click on Company B (which brings up the
divisions of Company B). I then click on Company A again. This brings up
the divisions of Company A (as it should), but Division A2 is again
highlighted even though the user has not yet selected a division.
Also, if I've selected the nth item in the list, debugging shows the
listindex as n-1 (consistent with the documentation), but it's .selected(n)
that shows as true and .selected(n-1) as false. According to the
documentation, .selected is 0 based just like listindex, so shouldn't it be
..selected(n-1) that's true?
Any thoughts?
Thanks in advance.
under XP Home).
My form has 2 listboxes: lbxCompanies and lbxDivisions. Both have
mutiselect = no
Clicking on a company in lbxCompanies dynamically requeries the Rowsource
for lbxDivisions so that only divisions of the selected company are showing.
This all works fine.
HOWEVER, lbxDivisions seems to "remember" which division was highlighted for
a given company, and re-highlights that division if I leave that company and
again come back to it.
For example, I click on Company A and then click on Division A2 (one of the
divisions of Company A). I thing click on Company B (which brings up the
divisions of Company B). I then click on Company A again. This brings up
the divisions of Company A (as it should), but Division A2 is again
highlighted even though the user has not yet selected a division.
Also, if I've selected the nth item in the list, debugging shows the
listindex as n-1 (consistent with the documentation), but it's .selected(n)
that shows as true and .selected(n-1) as false. According to the
documentation, .selected is 0 based just like listindex, so shouldn't it be
..selected(n-1) that's true?
Any thoughts?
Thanks in advance.