>I have records HMD1, HMD2, HMD3... HMD10.. if I do a set order to this field, foxpro lists the records as HMD1, HMD10, HMD2, HMD3..
>
>How can I arrange correctly?
It is treating the numeric digits not as integer numbers but as characters. You need to have the value as:
HMD001,HMD002,.....HMD010, etc.
You have to provide sufficient space for the digits to increment. You can alternatively build the index as follows (assuming the field name is mykey):
INDEX ON LEFT(mykey,3)+PADL(SUBSTR(mykey,4),4,"0") TAG mykey