Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft Access
Microsoft Access Queries
Key violation on Append Query
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Guest, post: 10229024"] Transaction table has ONE key field...Autonumber called TransID. No other fields are marked as "No duplicates". I'm inserting some transactions from a linked spreadsheet. Has worked exactly as written before. SQL looks like this: INSERT INTO tblTransactions ( PartNbr, TransNbr, LineNbr, Qty, TransactionType, UserID, SessionID, TransactionDateTime ) SELECT qryNewPOs.strPartNbr, qryNewPOs.[PO No], qryNewPOs.[PO Line], qryNewPOs.Qty, "P" AS Blah1, "Auto" AS Blah2, "Auto" & Now() AS Blah3, Now() AS Blah4 FROM qryNewPOs; Note, no reference to TransID, as this is an autonumber field (Access 2003 with FE/BE...all tables are linked to a backend .mdb) When I run the query, I get a key violation on all inserted records. Where do I look for an answer? I tried manually adding a record to the trans table. It worked, and the TransID field incremented by three or four (probably due to multiple times I ran the above query and failed....) Still no joy. I deleted the record I added manually. Still no joy. I think the engine has lost track of the autonumber sequence. How can I reset it? [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft Access
Microsoft Access Queries
Key violation on Append Query
Top