>>>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