Is it possible to copy and paste specific fields into a new table with Primary Key?

Mythblstr

Registered User.
Local time
Today, 03:49
Joined
Nov 14, 2007
Messages
32
I have a table and I want to copy the Primary key, last name and first name fields but the primary key never copies over to the new table. All I get is a sequentially numbered list where I want to maintain the original Primary key IDs. Is it possible to paste the primary key field into the new table or do I have to add them individually to create a related table?
Help!
Using Access 2007
 
Why would you be copying the Key, Last Name and First Name over to a new table? Normally, you would only copy the key (into a Long Integer field) because with the key you can get the name from the other table. Storing the text of the name fields is redundant and goes against normalization principles.
 
I'm not too much of an expert on access, but just pasting the Primary Key field will work fine. When I attempt to paste exclusively the primary key field I get the same thing, just a sequential list of numbers.
So I created a new table and set the key field to "autonumber" and the field size to "long integer". Can you tell me how to create a new table that will reference specific fields from the original table?
Thank you for your quick response.....
 
I'm not too much of an expert on access, but just pasting the Primary Key field will work fine. When I attempt to paste exclusively the primary key field I get the same thing, just a sequential list of numbers.
So I created a new table and set the key field to "autonumber" and the field size to "long integer". Can you tell me how to create a new table that will reference specific fields from the original table?
Thank you for your quick response.....
1. In the new table, for copying over the ID numbers, you would use a field of Long Integer (not autonumber).

2. The new table would have its own autonumber field as ITS primary key but the numbers you are copying over are considered the FOREIGN KEY because they are the primary key in the OTHER table which identify those records.

So, you have the new numbers into the field in the 2nd table. You then, in a query can add both tables in to the query window and you link between the table 1 autonumber field and the table 2 Long Integer (not autonumber) field.

Then you can put the fields you want from table 1 into the query grid and the query will return only those records that match from table 2.
 

Users who are viewing this thread

Back
Top Bottom