Q:

MS Access - after Paste confirmation event

Is it possible to capture an event AFTER the paste confirmation message has been displayed when a user pastes records directly into a datasheet subreport? I need this to be able to log when new records are created in an audit table.
By capturing the Before/After Update and Insert events, I can easily create a collection of records that have been added, ready to insert details into the audit log, however after all these events have fired the user is then prompted to confirm with a "You are about to paste x record(s)" message. 
So the problem is the user may click "No" here, and I can't find any way of capturing this, meaning the insertions could all be captured in the audit log, but as the user cancelled the request the records wouldn't actually exist.
The only way I can think of handling this is to create a temp table to display the existing records, and adding a "Save" button to write the temp table back, but running a comparison beforehand to update the audit log. However, this isn't ideal, especially as there is more than one of these tables.

A:

If you use a Data Macros you can achieve this. I set up a table, TestDataTable, that looks like this which will be audited

and an audit table like this

I added 3 data macros to my TestDataTable

The After Insert looks like this

After Update looks like this

and After Delete looks like this

Which generates records which looks like this

And if you paste data in but click NO on the paste confirmation Access takes care of everything for you. Those records are not added to your main table and no audit records are inserted.

