Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot add or change record

Status
Not open for further replies.

mortkc

MIS
Apr 23, 2001
84
US
Does anyone know a way around this error?

Error Type:
Microsoft JET Database Engine (0x80040E21)
You cannot add or change a record because a related record is required in table 'Items'.

none of my fields are required, and I have them set to allow zero length.

Thanks.
 
This does not have to do with a required field. It has to do with a relationship between that table and the items table. Go into tools/relationships and you should be able to see how your table is related to items. My guess is that you have a foreign key 1:M relationship.
 
Hi!

This message is saying that there are two tables that have a relationship and the referential integrety is enforced. For instance if you have the following two tables:

tblParts
PartNo
Description
Cost
QtyOnHand

tblOrderLines
OrderNo
PartNo
Price
QtyOrdered

If the two part number fields have been related and the box checked to enforce referential integrety then you won't be able to a part number to tblOrderLines unless it already exists in tblParts. If you try, you will get the message you posted.

hth


Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top