General discussion


Turn off confirm in Access

By dliby ·
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?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by sgt_shultz In reply to Turn off confirm in Acces ...

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

Collapse -

by schmitz.john In reply to Turn off confirm in Acces ...

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.

Collapse -

by dliby In reply to

I wrote so Visual basic code to resolve the issue. Thanks,

Collapse -

by dliby In reply to Turn off confirm in Acces ...

This question was closed by the author

Related Discussions

Related Forums