Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index on Month
Message
 
À
14/08/1998 17:08:56
Zaraq Bari
Bari Studios Limited
Lahore, Pakistan
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00127022
Message ID:
00127175
Vues:
38
>>>I have set a character field named Month with a regular index to store name of the months.When I use SET ORDER TO MONTH it indexes the field Month alphabetically as it is supposed to.How can I make it index on January , Feburary , March and so on instead of April, August, December etc....
>>>Thank You All
>>>Zaraq Bari
>>
>>You could add another (numeric) field to hold their order and index on that:
>>
>>- Month -|Num
>>January -| 1
>>February | 2
>>March ---| 3
>>...
>
>Thanks but can't add numeric field to the table as it will look awkward in a form besides the other fields.I click the grid header to set order to fields.
>Any other suggestions?
>Zaraq

Zaraq,
You can add the numeric field to the table and fill it automatically when the text field is filled, so it never shows on the screen. In your grid header click() method for the Jan/Feb/Mar/ field, just set the index to the tag for the numeric field.

If you can use Robin's month() suggestion the same, that would be even better, since you don't need the extra field (assuming the date from which the text field is drawn is available)

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform