Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

You cannot add or change a record because a related record is required in table

Posted on 2009-07-10
4
Medium Priority
?
442 Views
Last Modified: 2012-05-07
I have a slight problem that is driving me nuts. I get the following error You cannot add or change a record because a related record is required in table PartsOrg I have a subform that is populated by a combobox from the Parts table. I renamed it to PartsOrg and created a new table called Parts from a create table query and populated it with the data from the PartsOrg, I then ran an update query that appended new data to the Parts table, both tables have the same schema but anytime one of the appended items is selected to populate the form I get the above error but not with items that were originally in the table, just the appended ones. I have checked all my forms, queries, and reports and all point to the Parts table and not the PartsOrg table. However when I checked the Object Dependencies on the Parts table PartsOrg shows up in both Objects that depend on me and Objects that I depend on. I checked the Relationships but PartsOrg is not there. See screen shot
PartsTblOBJ-I-Depend-On.jpg
0
Comment
Question by:skull52
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 85
ID: 24825276
Do you have a Relationship diagram you can show?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24829690
<No Points wanted>

The error basically means that you are trying to add a Child Record for a Parent Record that does not exist.
For example:
tblCustomers
CustID, CustName, CustEmail
22, ABC inc, abc@abc.com
25, XYZ Corp, xyZ@xyz.org
77, 123 Publishing, 123@123.Net

tblOrders
OrderID, CustomerID, OrderDate
1289, 37, 1/18/2009

Here you are trying to place an Order (Child Record) for a Customer (37) that does not exist in the Parent Table.

So "Somewhere" in your Process, this is what is happening.

I am sure LSM, can help you through this.
;-)

JeffCoachman
0
 

Accepted Solution

by:
skull52 earned 0 total points
ID: 24858707
Jeff,
Thanks for the explanation that's what was driving me crazy I couldn't find any relationships to the old table in my forms, quires , or reports so what I did to rectify the situation was to delete the old table as i no longer needed it which removed all relationships and that seemed to work
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24862227
;-)
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question