Set primary key using macro

L

Lynn

Is there a way to set a field in a table as the primary
key in either the make table query or in a macro? Thanks.
 
S

Steve Schapel

Lynn,

I think the only way you could do this with a macro is to use a RunSQL
macro action, and enter a ALTER TABLE statement for the SQL Statement
argument of the macro. You can find more information by looking in
Access Help at the CONSTRAINT Clause topic.
 

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

Similar Threads

Primary Key 1
MS Access Avoiding redundancy 1
How to use where statement?? 3
Access 2010 Form Issue's 0
Access Access Record Order 0
emptying table 2
Copy linked table and Paste as Data 1
Import Marco 2 questions 2

Top