Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to add Autonumber Primary Key to Make Table Query

Status
Not open for further replies.

clint6

Technical User
Feb 8, 2007
12
0
0
US
Is there a way to do this. I'm basically just making a new table from a query, but I need a primary key in this table. I'd like to have this done without editing the table after I create it with a query. Can I insert a column in the query, call it GradeID, and somehow designate this to be autonumber indexed with no duplicates before I run the query?

In the column field I could have the following: GradeID:(then what?)

Thanks
Clint
 
If I understand you are running a make table query to make a new table from a subset of the original table. If that is the case, with your new table go to design view and add a field "GradeID" and make it an autonumber. It will give a number to each record.
 
I don't know of a way to do it without using some VBA code to create the PK and the field.



I tried to have patience but it took to long! :) -DW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top