Append Query mutually exclusive with Autonumber Primary Keys

kart_deBlonch

New Member
Joined
Apr 21, 2003
Messages
31
Hi All:

To the best of my knowledge, an append query will not work when appending to a table that uses an Autonumber for a primary key. Is this always true? If not, how is it done? Actually, if there is a way to do this that involves VBA, that would be good cuz I may need to write some code to take a parameter, select one record based on the parameter and then append a copy of that record, with a new primary key to the table it is copied from. Can this be done and, if yes, could someone copy some code to me? I would appreciate it.

Thanks everyone...
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Re: Append Query mutually exclusive with Autonumber Primary

Actually, I guess the problem is not so much the datatype for the primary key as it is the fact that there is a primery key. Looks like you can't use them in the append query....
 
Upvote 0

Forum statistics

Threads
1,221,531
Messages
6,160,357
Members
451,642
Latest member
mirofa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top