View Full Version : The Microsoft Jet database engine cannot find a record in the table <name> with key m


DFowler
09-02-2008, 05:59 AM
Right then people this is probably something mega easy but i am having a mare with it at current as no matter what i try i get the above error, I have a parent child relationship based on a Primary key autonumber which updates into a seperate table with large quantities of data assigned to each autonumber, Not sure why but every time i try to add a new record i get the above, Somebody please help before i lose more hair. Cheers

georgedwilkinson
09-02-2008, 06:07 AM
You must add data in your ONE side table before you add data to the MANY side.

DFowler
09-02-2008, 06:09 AM
Right yeah, my bad shoulda explained myself better, The one table is updated on the same form so is always populated first with the autonumber and other details the Many table is then updated via a subform which is when the error occurs

georgedwilkinson
09-02-2008, 06:11 AM
Can you post a screen shot or a sample?

DFowler
09-02-2008, 06:16 AM
Right have attached a screenshot of both tables and of the form in question i know its gonna turn out to be something really simple, but brain is beginning to implode now lol

georgedwilkinson
09-02-2008, 06:19 AM
This does not display the error. It looks like you have the "Batch" number defaulting to "0", this could be your problem. Since it is a Foreign Key, take out the default.

DFowler
09-02-2008, 06:22 AM
I changed the 0 and still same error as attached

georgedwilkinson
09-02-2008, 06:43 AM
What are "Link Master" and "Link Child" fields set to?

DFowler
09-02-2008, 06:45 AM
I have attached the relationship

boblarson
09-02-2008, 06:48 AM
That error message, from my experience, means you have a corrupt record in your database.

1. Make a copy of the db file

2. Open the copy and then run compact and repair

3. Open your table and scan down the list until you find a record with no primary key and that is the likely culprit and then you should be able to delete it (after the compact and repair).

georgedwilkinson
09-02-2008, 06:48 AM
Nice screen shot but it does not answer the question.

Select the outer container of the subform (handles will be visible but the square will not be black). It's kinda hard to select but persevere. Check the properties for Link Child/Master on the data tab.

DFowler
09-02-2008, 06:53 AM
Lol yeah did that, reset them up and woooo got a new error message this time, Seriously thinking i might just go kill myself shortly lol, new error message is as attached