AfterCommitTransaction Event

Microsoft Access Visual Basic

Show All

AfterCommitTransaction Event

       

Occurs just after Microsoft Access commits changes inside a batch transaction to the server.

Private Sub Form_AfterCommitTransaction(Connection As ADODB.Connection)

Connection   The connection on which the batch transaction is taking place.

Remarks

This event applies to Access project forms whose BatchUpdates properties are set to True.

This event occurs only if the batch update was successful. Any changes to the data at this point are made outside the batch transaction.

Example

The following example demonstrates the syntax for a subroutine that traps the AfterCommitTransaction event.

Private Sub Form_AfterCommitTransaction(Connection As ADODB.Connection)
    MsgBox "Access has committed all pending updates to " _
        & Connection.Name & ". The batch transaction is now complete."
End Sub