creating tables from code - Primary Key

G

Guest

I received a good response from Doug Steele as to how to create an
auto-number field and I forgot to ask how to declare it the Primary Key. I
figured it out using the index-object.primary but then I wanted to create a
many to many table with a Multi-Field primary key and I don't see how to do
this. I poured thru the Help for 3 hours trying several different things and
came up dry as to how to Define Two Fields (indexes) as the Primary Key. I
hope someone can help me with this!! Thanx in advance!
 
B

bob

Here's one way: If you run this SQL it should do it.

CREATE UNIQUE INDEX indexNo
ON tblPIMCommentsSF (IndexNo)
WITH PRIMARY;


Bob
 
G

Guest

thanks bob - I'm sorry I posted twice...the thing went caflewy and I didn't
think it had posted because I didn't get a conformation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top