Beginners Question on Primary Key

T

The parawon

Is there a way to set a primary key in the queries tab of Access? I would
like to set the primary key before I run my select query or make-table query.
Is there a way to do this without having to go into the tables tab of the
database window? A clue in the right direction would be very appreciated.

Thank you.
 
J

Jeff Boyce

Select queries run against established tables (and other queries). If those
precursors don't have a primary key, you won't get a primary key when you do
a select query.

A make table query doesn't provide a mechanism to designate a primary key,
or to set one of the fields as an Autonumber data type via the query
definition window. Scan this newsgroup for earlier posts concerning using
code/VBA to set an Autonumber (but it isn't "beginner" level stuff).

You've described a "how" -- if you explained a bit more about the "what" and
"why", the 'group readers may be able to offer an alternate approach.
 

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