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.
400 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Tom van Stiphout 1,696 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.


  2. Biorn Veiro 0 Reputation points
    2024-07-02T10:21:51.3066667+00:00

    I entered the Ctrl+Break as recommended, but nothing happened. I have tried to activate the debugger when I enter the main form, where the problem occurs in one of its subforms, but though I could see that the debugger was active, it did not seem to be the case in the subform with my problem

    Biorn Veiro

    0 comments No comments

  3. Biorn Veiro 0 Reputation points
    2024-07-02T10:46:44.3833333+00:00

    I added a comment with the verbatim message you required.

    What is the difference between a comment and an answer?

    Biørn Veirø


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.