Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox numeric values and speedsearch
Message
De
02/12/2004 11:04:22
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00966403
Message ID:
00966412
Vues:
7
Is there a quick way to select from a table into another table and change the type from numeric to character during the process? In this form the listbox is simply used as a selection tool...

Current Live fields in acordfrm table:

acordfrm.desc c(50)
acordfrm.formname n(10,0)

Desired for testing in taccord table:

acordfrm.desc c(50)
acordfrm.formname c(10)

Can't find anything like that in help - I've never done it. Is it possible without stepping through the table record by record and converting the values in the temporary table?

TIA,
Tracy


>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
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform