Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp50 - I want to SORT
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00025541
Message ID:
00025827
Vues:
30
>>>I am looking for a sample like step 1. in the FORM
>>>Wizard that shows you how you can select the fields
>>>you want. I would like this so my users can pick the
>>>fields they want to SORT on. After they pick the fields
>>>that want, they click OK and the program will build a INDEX from their choices using a string.
>>>example..
>>>
>>>INDEX ON string TAG yourindx
>>>
>>>Can you help?
>>I was modifying an app which had a combobox whose .RowSourceType property was 8 - structure. It didn't look like page1 of the wizard or anything, it was just a combo, but it did what you want - it gave a list of the fields. However, I promptly got rid of it. In the case of my table, there were several fields which the customer would never use for sorting. I asked the customer what fields would be used for sorting, and created a half-dozen index tags. The RowSourceType for my box is now an array. I have a function which reads TAG(i) into the array, looping from 1 to TAGCOUNT(), and excluding tags I didn't want to use. This approach worked for me because the number of index tags is not so large, so reindexing shouldn't take too long. I suppose that if I had many more fields that could be used for sorting, I could have tried using .RowSourceType = 8 - structure and then used the .RemoveItem method to remove fields (such as logical fields) which would make dumb sort fields. Then
>I
>>could have made index tags for the most commonly used ones and used INDEX ON for less commonly used ones.
>
>Hi Bret...
>I loaded a COMBO BOX with the RowSource as an array, but, at load time, it
>can not find the array source. Where do you put your code for the array?
>
>Rob
I made the array a property of the form, then filled the array in the FORM.Init, then did a THISFORM.Combo.Requery. That may not be the best way, but it worked.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform