Hi, all.
Okay, this is what I'm doing. I was asked to write some code to make some changes to the structure of an existing database. Right now, I need to remove the primary key on one of the tables,(which can be done using the "ALTER TABLE <tablename> DROP CONSTRAINT <PrimaryKey>" statement) But the problem is that this field is used in a relationship connecting to another table. So to drop the primary key, I must first delete the relationship associated with it. And that's where I'm stuck. I know that it can be easily done manually in Acces, just by selecting it in the relationship window and deleting it, but I have no idea how to do that in VBA. I tried to use the "ALTER TABLE <tablename> DROP CONSTRAINT <indexname>" statement, but it doesn't seem to work, well probablly because it's wrong.
So, please, if anyone has done this before or knows where I can get more help, PLEASE HELP ME?!!!?
Thanks a lot.
Okay, this is what I'm doing. I was asked to write some code to make some changes to the structure of an existing database. Right now, I need to remove the primary key on one of the tables,(which can be done using the "ALTER TABLE <tablename> DROP CONSTRAINT <PrimaryKey>" statement) But the problem is that this field is used in a relationship connecting to another table. So to drop the primary key, I must first delete the relationship associated with it. And that's where I'm stuck. I know that it can be easily done manually in Acces, just by selecting it in the relationship window and deleting it, but I have no idea how to do that in VBA. I tried to use the "ALTER TABLE <tablename> DROP CONSTRAINT <indexname>" statement, but it doesn't seem to work, well probablly because it's wrong.
So, please, if anyone has done this before or knows where I can get more help, PLEASE HELP ME?!!!?
Thanks a lot.