I once had a solution a long time ago see thread701-1164476 but we have upgraded from 97 to 2003 and I don't know why this will not work. I am assuming operator error but here goes.
I have a table created via make table query. I need to add a 2 field primary key to speed things up later.
Table = tbl_rpt_5_cc_inv
Two fields for key = "cus_num" and "Class_code"
I have tried both of these and always get the error
Invalid field definition "cus_num" in definition of index or relationship even though the field exists in the table
I have attempted to run each of the below statements using "RUNSQL" from the same macro which creates the table with the same error.
CREATE UNIQUE INDEX PrimaryKey ON tbl_rpt_5_cc_inv (cus_num) WITH PRIMARY
ALTER TABLE tbl_rpt_5_cc_inv ADD CONSTRAINT ConstraintName PRIMARY KEY (cus_num, class_code)
If further clarification is necessary please let me know.
Thanks for any help.
I have a table created via make table query. I need to add a 2 field primary key to speed things up later.
Table = tbl_rpt_5_cc_inv
Two fields for key = "cus_num" and "Class_code"
I have tried both of these and always get the error
Invalid field definition "cus_num" in definition of index or relationship even though the field exists in the table
I have attempted to run each of the below statements using "RUNSQL" from the same macro which creates the table with the same error.
CREATE UNIQUE INDEX PrimaryKey ON tbl_rpt_5_cc_inv (cus_num) WITH PRIMARY
ALTER TABLE tbl_rpt_5_cc_inv ADD CONSTRAINT ConstraintName PRIMARY KEY (cus_num, class_code)
If further clarification is necessary please let me know.
Thanks for any help.