Solved

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

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
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.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

930 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now