>>If I have a listbox that shows 10 records at a time and I issue something like mylistbox.Selected(24)=.T., how do I make the listbox show a range of records that includes 24? Refresh and Requery don't seem to accomplish anything.
>
>I just made quick test and mylistbox.Selected(24)=.T. itself moves list items to proper range automatically. I tested for RowSourceType=0 and RowSourceType=6. What sourse do you use?
I am using RowSourceType=6. The listbox is on the second page of a 2 page pageframe. In Page2.Activate I have the code:
THIS.mylistbox.SetFocus
and in mylistbox.GotFocus I have the code:
THISFORM.LockScreen=.T.
mnrecno=RECNO()
COUNT ALL WHILE RECNO()#mnrecno TO mnoffset
THIS.Selected(mnoffset+1)=.T.
THISFORM.LockScreen=.F.
The right item is selected but the listbox does not move itself to the proper range. Is there something in my code that could be preventing this?
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada
cmagee@metroland.comNever mistake having a career with having a life.