Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.Selected() Method
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
.Selected() Method
Miscellaneous
Thread ID:
00035044
Message ID:
00035044
Views:
80
I have a 2 page pageframe on my form. Page 1 is for data entry with index tag set to "Projects". Page 2 has a listbox based on fields for navigation purposes with index tag set to name. When the user moves from page1 to page2 I ensure that the correct item in the listbox is highlighted with the following code in the Page2.Activate() event:

THISFORM.LockScreen=.T.
SET ORDER TO Name
mnrecno=RECNO()
COUNT ALL WHILE RECNO() # mnrecno TO mnoffset
THIS.lstPerson.Selected(mnoffset+1)=.T.
THISFORM.LockScreen=.F.

(thanks to Matt Mcdonnell for the basis of this code)

My problem is this. This works perfectly all the time EXCEPT for the first time. HELP!! Any ideas as to why?

Thanks in advance --
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Next
Reply
Map
View

Click here to load this message in the networking platform