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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transaction using multiple DoCmd.Run SQL Statements

Status
Not open for further replies.

birgitd

MIS
Feb 19, 2002
29
US
I'm trying to set up something like:

BEGIN TRANS

DoCmd.RunSQL strSql1
DoCmd.RunSQL strSql2
DoCmd.RunSQL strSql3

mgs = "Are you sure you want to run this SQL?"

If MsgBox(mgs, vbQuestion + vbYesNo) = vbYes Then
COMMIT TRANS
End If
Else
ROLLBACK TRANS

But it doesn't work. If my strSql3 fails, strSql1 & strSql2 are still committed.

Any help would be appreciated.

Thanks,
Birgit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top