I am trying to run an append query, and I am getting a key violation message for all the records I am attempting to append.
I did a search and have thoroughly read post 224225 (and I think I understand it) but I am still getting the error message.
I am trying to append data from T_Results to T_ResultDetails.
I want to append:
[T_Results.NewID] to [T_ResultDetails.SurveyID]
[T_Results.Wages] to [T_ResultDetails.Rating]
My table T_ResultDetails has five fields and there is currently no data in it.
[DetailID] is an autonumber primary key for the table.
[SurveyID] is a number field, and is linked one-to-many with referential integrity to [T_Results.NewID]. In T_Results, the field [NewID] is an autonumber primary key.
[Section] is a text field not linked to anything.
[Item] is a text field linked one-to-many with referential integrity to another table’s text primary key. I have [T_ResultDetails.Item] set with a default of the appropriate item primary key (in this case, 1A).
[Rating] is a text field – as is [T_Results.Wages] which I am attempting to append to it.
In T_ResultDetails, only the primary key field is set for no duplicates, although [SurveyID] is indexed with duplicates okay.
I have tried deleting table relationships (and when that didn’t help I linked them back up), I added the default value [Item] so it wouldn’t create blank fields, I have checked my data types and unless I’m missig something they appear to be compatible, I compacted the database, and I am now fresh out of ideas.
(in case anyone wonders why I’m trying to append data from one table to another that is linked to it, it’s because I’m trying to move most but not all of the data from a table that was set up as a flat-file for easy data-entry by volunteers into a relational format that I can actually query without turning myself inside out . Most of the tables and queries in this database were imported from one I built three years ago which worked fine. I have made only minor changes, and I can’t see that any of them would affect what I am trying to do here).
Can anyone suggest something else I can try?
Thank you,
-cynthia