Hello
I am stuck implementing a transaction/rollaback feature on an access form.
Here's the stripped down outline of what I've done:
In the form's Load handler, I start the transaction
dbEngine.BeginTrans
gInTransaction = true
Then, there's a "Cancel" button, whose Click handler goes like
dbEngine.Rollback
gInTransaction = false
doCmd.close acForm, "frmName"
Finally, the form's Unload handler has:
if gInTransaction then
dbEngine.CommitTrans
gInTransaction = false ' just in case
end if
Now, there seem to be no effect on the form regarding the rollback. Pressing the "Cancel" button does not seem to rollback anything.
I also tried replacing dbEngine with dbEngine.workspaces(0), with no effect either.
So, the question is: how do I implement transaction in Access?
Thanks for any pointer into the right direction, Rene