Solved

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

Posted on 2009-07-10
4
437 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

696 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