J
Jim Bunton
I have a serious problem with BeginTrans - Rollback
Rollback isn't working
Below is the code for a command button on a test form on a test table
in a big complicated FromtEnd access 97 application
after the code is run the table has a new record in it!
The form + code work as expexted if dragged into a new database
Have tried:- Repair,Compact - no go!
ANY IDEAS PLEASE?
you might try an Access VBA newgroup
########## CODE ########
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim cdb As Database, testset As Recordset
BeginTrans
Set cdb = CurrentDb
Set testset = cdb.OpenRecordset("xxTest", DB_OPEN_DYNASET)
testset.AddNew
testset!egno = 1
testset.Update
Rollback
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
###### END CODE #########
Rollback isn't working
Below is the code for a command button on a test form on a test table
in a big complicated FromtEnd access 97 application
after the code is run the table has a new record in it!
The form + code work as expexted if dragged into a new database
Have tried:- Repair,Compact - no go!
ANY IDEAS PLEASE?
you might try an Access VBA newgroup
########## CODE ########
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim cdb As Database, testset As Recordset
BeginTrans
Set cdb = CurrentDb
Set testset = cdb.OpenRecordset("xxTest", DB_OPEN_DYNASET)
testset.AddNew
testset!egno = 1
testset.Update
Rollback
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
###### END CODE #########