Not understanding Error -177 solutions

I’m encountering an error that I saw has been talked about on this forum, but unfortunately I’m not the most tech literate and the explanations given are totally foreign to me. I’ve also tried the pdf version of the 7.3 Base Guide, but I wasn’t finding anything I understood in there either.

I’m trying to create a database of contacts and events they’ve attended.

I have a table (Contacts (Bridal)) that contains all of the information about the people I’ve met. I also have a table (Events) that contains all the information about the events I’ve attended. I’m trying to connect them via a third table (Event Attendance) in which I relate the contacts to the events they’ve attended.

This is my current relationship setup between these tables.

When I try to put the Person and Event IDs in the Event Attendance table, I get an error that says this:
Integrity constraint violation - no parent SYS_FK_97 table: Contacts (Bridal) in statement [INSERT INTO “Event Attendance” ( “Event ID”,“Person ID”) VALUES ( ?,?)] at C:/cygwin64/home/buildslave/source/libo-core/connectivity/source/drivers/jdbc/Object.cxx:172

As I said, I looked this up on the forum and I tried looking at the relationship sections in the guide, but nothing is making any sense to me. Can someone help explain?

For reference, this is my version info:
Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

What you need is this: Chapter 1 Introducing Base
Example show a n:m-relationship.

  1. “Event Attendance” contains a new key “ID”. The normal way is to create the key as combination of “Person ID” and “Event ID”.
  2. “Person ID” in “Event Attendance” could only be filled with values of “Person ID” in “Contacts (Bridal)”. Same with “Event ID” in “Event Attendance” and “EventID” in “Events”.
  3. The error you get is an error that you try to put a value in “Person ID” of “Event Attendance” which doesn’t exist as “Person ID” in “Contacts (Bridal)”.

I would fill “Events” directly in the table “Events”. Then create a form, which has “Contacts (Bridal)” as MainForm and “Event Attendance” as SubForm. Subform should contain a tablecontrol with a listbox, which shows the Events and writes the EventID. It is the same as it is constructed in the example in Base Guide with entrants and sport.

Thanks! Deleting and remaking the table with the Primary Key being a combination of Person ID and Event ID seems to have worked.

However, I still don’t understand why. Would the primary key really make that much of a difference? its the only thing I changed.

I thought that the error had something to do with the IDs I’d put in, but I double checked that the IDs were correct. I also have put the exact same IDs in the new version of the table, and it worked just fine. Is it possible this was some kind of glitch?

Primary key in table “Event Attendance” shouldn’t make a difference. If you set primary key to “Person ID” and “Event ID” together it will only prevent for input duplicates in this combination.

The error Integrity constraint violation - no parent SYS_FK_97 table: Contacts (Bridal) only says: You try to input a value in “Event Attendance”, which isn’t a value for primary key in “Contacts (Bridal)”.