append query to table with autonumber pk

  • Thread starter Mitchell_Collen via AccessMonster.com
  • Start date
M

Mitchell_Collen via AccessMonster.com

Hi,

I know this is probably really simple but I just can't get it at this time. I
have an append query that is supposed to append data to a table. The table
has a pk autonumber. It is set to no index. When I run the query it appends
the same data over causing numerous duplicates. I have thought maybe if I set
the date <> the date of the table to be appended that it would work but then
the access errored and said 0 records appended. Do you know how to get this
working?


INSERT INTO AbsenceRecordHR ( [Date], Employee_Name, Absence_Code, Comment )
SELECT [AbTable].Date, [AbTable].Employee, T3.New_AbsenceTypeCode, [AbTable].
[Absence Type]
FROM T3 INNER JOIN [AbTable] ON T3.Old_AbsenceType = [AbTable].[Absence Type]
;

Thanks in advance, Misty
 
S

Steve Schapel

Misty,

I am confused by this:
"The table has a pk autonumber. It is set to no index."

If it's the pk (Primary Key), then it must be indexed no duplicates -
Access won't allow it to be any other way!
 
M

Mitchell_Collen via AccessMonster.com

Steve said:
Misty,

I am confused by this:
"The table has a pk autonumber. It is set to no index."

If it's the pk (Primary Key), then it must be indexed no duplicates -
Access won't allow it to be any other way!
[quoted text clipped - 13 lines]
Thanks in advance, Misty

You're right, I worded that wrong. My apologies.
thanks, Misty
 

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