A family of Microsoft relational database management systems designed for ease of use.
Dear Darren,
You've already worked through this carefully, which helps narrow it down a lot. From my research, since appending only SessionID fails, and appending only ChangeDate fails too, the problem is probably not either of those fields. It's more likely related to the fields you aren't filling in, or to the table itself. The most likely causes are:
- Relationships in the back end database: If tblIntake is a linked table, the Relationships window in your front end won't show relationships defined in the back end. If a field such as GrowerID or BlockID is linked to a parent table with referential integrity enforced, any field you leave blank, or that defaults to 0, can trigger a key violation when no matching parent record exists. You can check this by opening the back end directly and going to Database Tools > Relationships > All Relationships.
- A combined unique index: Your index list shows GrowerID twice, which may mean some fields belong to a multi field index. If that index is set to unique, the combination of values can clash with an existing record even when each field looks fine on its own. You can check this in Design View > Indexes.
- The AutoNumber seed: Access can sometimes try to reuse an IntakeID that already exists, for example after an import. Back up the database first, then run Database Tools > Compact and Repair Database and try again.
A quick way to tell these apart is to open tblIntake and add a record by hand without entering IntakeID. If that also fails, the cause is in the table. If it works, the cause is in what the append query sends.
I hope this helps you track it down. Looking forward to your reply.
If the answer is helpful, please click "Yes" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in the forum documentation to enable e-mail notifications if you want to receive the related email notification for this thread.