>
>At the root of the problem is, I think, that the tag xrec is an index on a field named recnum and that somehow VFP gets confused and thinks that the index expression is recno or some other reserved word.
You can be pretty sure that this is not the problem. VFP shouldn't get confused because the field is named recnum.
Do you by any chance have more than one .IDX or .CDX file associated with this table? Is this table a free table or a part of a .DBC? Do you have more than one table that you open with this same alias? The 3rd question is one I'd be looking at closely.
When this error occurs, you need to learn more about the table. It the table is really in USE, you can use AFIELDS() to populate an array and see if, indeed, the field recnum does exist. Or if this happens in the IDE, just select the table and MODIFY STRUCTURE and see if you learn anything.
Steve Gibson