Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transaction Processing through different SubProcedures

Status
Not open for further replies.

carmo

MIS
Dec 15, 2002
92
0
0
CA
A have a form that contains 3 command button. Each command buttons performs a certain action in a table. I would like to create a transaction (Commit/Rollback), although I am not sure how this would work since I would like to BeginTrans to be in one subprocedure and the Rollback to be in an other subprocedure. I have done this before, but where all the actions were performed in the same sub procedure. Anyone have any ideas? Thanks.
 
It should work without a problem. The BeginTrans/EndTrans context is the Jet Workspace object. That's constant throughout the execution of your database--even across forms!

One caveat: From experiments, I gather that all of the recordset processing done by Access actually occurs in a separate, private workspace. At least, I wasn't able to find a way to coordinate the Rollback of updates I did in code with those done by Access on the underlying recordset of the form that contained my code. You can wrap your own updates in a transaction, but apparently you can't control Access' updates.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top