Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox numeric values and speedsearch
Message
 
 
To
02/12/2004 10:48:10
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00966403
Message ID:
00966407
Views:
7
Try this -- select your list of forms into a cursor and make the numeric formname a character field instead. Then use that cursor as the source for the listbox.

>I have a form that contains a listbox. The listbox displays forms and their form number in two separate fields. The user can sort the listbox by either the form name or the form number. When the user sorts by form number, the following code is run:
>
>	SET ORDER TO TAG FORMNAME
>	THISFORM.LIST1.ROWSOURCE='formname,DESC'
>	THISFORM.LIST1.COLUMNWIDTHS = '130,300'
>	THISFORM.LIST1.REQUERY()
>	THIS.CAPTION = "Sort By Form Name"
>	THISFORM.LABEL2.LEFT = 200
>	Thisform.label1.caption = 'Form Number'
>	THISFORM.Label2.caption = "Form Name"
>
>
>The field formname is really a numeric field of n(10,0).
>
>The problem occurs with speed search in the listbox when the form number is the sort order (formname). If I have the following forms:
>
>1
>2
>3
>4
>12
>13
>50
>125
>126
>etc
>
>If the pointer is on 1 and the user presses 125 quickly, the pointer goes to 2. If the pointer is positioned on 12 and presses 125 quickly, the pointer goes back up to 2, etc. It does not work like it does with alpha characters. For instance, How to jump from 1 to 125?
>
>Any ideas?
>
>TIA,
>Tracy
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform