Solved

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

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

733 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