Error 3101 in Access 2013

Biorn Veiro 0 Reputation points
2024-07-01T20:09:32.73+00:00

I have an error 3101 message in my desktop database (Access2013). I do have a one to many relationship, but the "many" side does have a corresponding record on the "one" side, but I get the 3101 error anyway. How can that happen?

Bioern Veiroe

Access
Access
A family of Microsoft relational database management systems designed for ease of use.
332 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tom van Stiphout 1,701 Reputation points MVP
    2024-07-02T00:34:37.0733333+00:00

    (in the Immediate window)
    ?AccessError(3101)

    The Microsoft Access database engine cannot find a record in the table '|2' with key matching field(s) '|1'.

    This is why we ask to quote all error messages VERBATIM. In this case it would help to know the replaceable parameters.
    I am assuming you have an enforced relationship between the two tables. Good! Keep it that way.
    When this error occurs, you should hit Ctrl+Break to break into the debugger, and see where the error is being generated. Show us that code. Inspect the variables in the procedure to determine if they have the expected values. It is very likely you have an unexpected foreign key value that was almost being saved to the child table.

    0 comments No comments