Discussion Locked

Turn off confirm in Access

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
When I copy records from one table to another that has a key violation I get a message that "Hardware/Software Information can't append all the records in the append query" Can this confirmation be turned off? I have gone into Tools|Options|Edit/Find and checked off the confirm items, but this doesn't help. Is there another way of handling the confirm?

4 replies

by sgt_shultz

you can use code and the iserr function to continue past the error?
you could not append the offending records/fields?

by schmitz.john

I have had similar conditions and found you must fix the issue of the KEY VIOLATION. Your primary or foreign keys do not match. Once this is fixed, create a macro to run your append query and start the macro with the SET WARNINGS action to NO. This allows operation of a macro without having to confirm each action in the macro.

I'm getting a key violation message.
A key violation occurs if:

You attempt to run a query that appends, deletes, or updates records in a way that violates the rules of referential integrity for related tables.
Your query attempts to append or update records that contain primary key values that already exist in the destination table.
If you run such a query, it will not modify the records that cause the key violation.

To modify records in a way that will violate referential integrity, you can break the relationship between the affected tables or turn referential integrity off, and then modify the affected tables one at a time. However, the resulting data in the two tables may then conflict.

This discussion is closed to new replies.