R
rick
anyone ever had any luck with the rollbacktrans method. I can't seem t
get it to undo the changes. the code is simple, no error message
either. i don't get it... thanks in advance.
Private Sub Form_Load()
Set cnn = New ADODB.Connection
cnn.Open "Provider= Microsoft.Jet.OLEDB.4.0;" & "Dat
Source=compliance_be.mdb;"
Set rs = New ADODB.Recordset
cnn.BeginTrans
rs.Open "tara", CurrentProject.Connection, adOpenDynamic
adLockPessimistic, adCmdTable
.....
end sub
Private Sub Form_Unload(Cancel As Integer)
Dim msg As Integer
msg = MsgBox("Do you want to commit all changes?", vbYesNo)
Select Case msg
Case vbYes
cnn.CommitTrans
cnn.Close
Exit Sub
Case vbNo
cnn.RollbackTrans
cnn.Close
Exit Sub
End Select
end su
get it to undo the changes. the code is simple, no error message
either. i don't get it... thanks in advance.
Private Sub Form_Load()
Set cnn = New ADODB.Connection
cnn.Open "Provider= Microsoft.Jet.OLEDB.4.0;" & "Dat
Source=compliance_be.mdb;"
Set rs = New ADODB.Recordset
cnn.BeginTrans
rs.Open "tara", CurrentProject.Connection, adOpenDynamic
adLockPessimistic, adCmdTable
.....
end sub
Private Sub Form_Unload(Cancel As Integer)
Dim msg As Integer
msg = MsgBox("Do you want to commit all changes?", vbYesNo)
Select Case msg
Case vbYes
cnn.CommitTrans
cnn.Close
Exit Sub
Case vbNo
cnn.RollbackTrans
cnn.Close
Exit Sub
End Select
end su