I have several ideas, I hope one of them helps.
If Visual FoxPro confuses the record number with a key label, perhaps adding the RANGE clause helps: SET KEY ... RANGE variablexxx, variablexxx
Or perhaps the index is corrupted. Try re-indexing.
Regards, Hilmar.
>Background: Single free table with an index of employee number, company, and code, all character.
>
>Problem: When set key is issued in program an error of "Table has no index order set" although there is an order set.
>
>One particular record with an employee number of 134 is where the problem is. Error occurs on "set key to variablexxx" which is the stored values of employee number and company. Changed the employee number to several different values and all was ok.
>
>In doing a little research the number 134 is also used for the f12 key. Have tried scattering and gathering record to same recno, different recno, and creating a totally new record all to no avail. However I can reassign the offending record by changing to a different employee number and that works. So it would seem it's not a problem with record corruption but something to do with that number itself.
>
>Any help would be GREATLY appreciated.
>
>TIA
>Brett
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)