0
votes

Issue: Microsoft Access data entry form will not write new records to tables. This form has worked before, there have been no changes to the back end or the form

The form is using a query as its record source. The query source is multiple back-end tables, and table relationships are defined and referential integrity is enforced.

We receive the following error after data is entered into form fields then attempt to close the form: "You cannot add or change a record because a related record is required in table 'name of table' ".

My troubleshooting confirms the following: -The table the error references is included in the query, and it is the table with the primary key. -The primary key is an auto number field and I confirmed the field does not need to be re-seeded. -I confirmed there is no corruption. -I have confirmed the form has the fields needed to enter data into all required fields in each table.

Any suggestions on where the issue could be?

1
Please add some paragraphs to make this actually readable. - Erik A
My apologies. I have modified it to make it easier to read. - SteveELN
Ah, that's a lot better. Please include the relationships for the table causing the error. - Erik A
I can send you the screenshot? Or how do you prefer me provide it? - SteveELN
A screenshot is fine. You can upload it from within this site. - Erik A

1 Answers

1
votes

I discovered the solution. Binding a "data-entry only" form's source to a multi-table query can render the form as read-only once data is written to one of the tables. The solution is to use sub-forms to enter data into the related tables.