Hi
I use SQL transactions on a form/subform to permit users to cancel any editing they have done in the subform. The subform is not linked
I've had this working perfectly but now Access crashes when I try to rollback... How does one diagnose these crashes? I'm at a loss....
Here's how my form works... I delare my resources in the subform module...
Code:
Private Edit_Wrk As Workspace
Private Edit_Db As Database
Private Edit_rstDAO As DAO.Recordset
Private Edit_Transaction_Begun As Boolean
An edit button sets up and calls
Code:
Dim SQLLine As String
'.... many lines of code here to build params for the SQLLine
SQLLine = "SELECT * FROM My_Table_Name WHERE " & SQLLine
Set Edit_Wrk = Workspaces(0)
Set Edit_Db = CurrentDb
Set Edit_rstDAO = Edit_Db.OpenRecordset(SQLLine, dbOpenDynaset)
Edit_Wrk.BeginTrans
Edit_Transaction_Begun = True
'Set up the form recordset
Set Me.Form.Recordset = Edit_rstDAO
User carries out edits......if they click the custom cancel button then....
Code:
If Edit_Transaction_Begun Then
Edit_Wrk.Rollback
Set Edit_rstDAO = Nothing
Set Edit_Wrk = Nothing
Edit_Transaction_Begun = False
End If
Recently, Access most often crashes at Edit_Wrk.Rollback.... although sometimes it crashes when returning to the main form.... Clearly something I've done recently has affected this but how do I find out what is crashing it? Are there crash logs or wahtever anywhere?
Thanks