Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Access Append Update Not Working
Bill Carver 

17 months ago
I'm creating an append query to update a table.  When I run the query I get an error stating that the two records are failing because of key violations.

in the words of Miracle Max it's only mostly evil.
Bill Carver OP  @Reply  

17 months ago

Bill Carver OP  @Reply  

17 months ago

Bill Carver OP  @Reply  

17 months ago

Marc Lievens  @Reply  
    
17 months ago
Hi Bill,
I think you want to update the location with the ID, but you reference to city.
You provide minimal info, but i think you need an extra field City in MK to lookup the City in ServiceLocation and update LocationID in the MK table, and only if Location in MK is NULL.
Bill Carver OP  @Reply  

17 months ago
Thanks marc.  You're right.   For not I'm converting a city to a record id from another table which is successfully going into city.  During the building process I'm just adding from spreadsheet.
The thing that has me perplexed is that I'm not writing to the ID field but am getting a key field violation when I try.  You'll notice that "locationID" is coming from servicelocations to translate the city field to an ID.
I'm expecting autonumber to automatically create an ID when I run the append query for the new records.  The location in mk will never be null.

I have viewed the query and the data is correct as shown below.  Yes this is just two records, but in the future there may be more to import.  I'm trying to make this as automated as possible to futureproof it all.  The intended user is happy with his spreadsheets until I show him the solution I'm building.
Bill Carver OP  @Reply  

17 months ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/17/2026 9:01:10 AM. PLT: 1s