Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seeking a Record in a List Box
Message
From
02/01/2003 12:22:55
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Seeking a Record in a List Box
Miscellaneous
Thread ID:
00737383
Message ID:
00737383
Views:
55
I have found that the following code is slow, as the listbox I have is quite large.
Instead of doing the FOR...NEXT loop, is there another way to select and highlight the record in the listbox ? I know the value of mPolicy.



FOR nCnt = 1 to o.listcount
if trim(o.list(nCnt,x))+o.list(nCnt,x+2)=mPolicy
o.selectedID(nCnt)=.t.
Exit
endif
NEXT nCnt

o.click
o.setfocus
Next
Reply
Map
View

Click here to load this message in the networking platform