I have created a table using a query within Opal. There are no memo fields in the table, no validity checks and I have tried creating the table and calling the field structure without using aliases. No matter what I do, I can't create a key on the first field of the table. If I restructure the table manually, it works. I get no error when it fails programmatically. I've been able to use this code to rename fields, change the table version and other things.<br><br>To add the field as a key I enum the table structure, open the table containing the structure and add an "*" to the key of the first field. The structure table reflects this change but when I assign that structure table to a dynamic array and use the restructure command, everything applies to the table except the key.<br><br>Corel doesn't have an answer in their knowledge base and I've checked other newsgroups with no luck.<br><br>Thanks in advance for any help from this group.<br><br>Pat<br>