forse trovate il problema guardando il codice:
codice:
Private Sub Form_Load()
Dim rs As Recordset
' Set the current workspace
Set wksp = DBEngine.Workspaces(0)
' Begin the transaction
wksp.BeginTrans
' Adding a new record
If (modFunctions.curId = -1) Then
DoCmd.GoToRecord , , acNewRec ' il problema é che se aggiungo dati il rollback non funziona
Me.cmdDelCb.Visible = False
' Load the selected one
Else
Set rs = Me.Recordset
rs.FindFirst ("case_id = " & modFunctions.curId)
Me.cmdDelCb.Visible = True
End If
' Show / Hide fields
If (Me.cstm_will_pay.Value = "Yes") Then
show 1, False
End If
If (Me.cb_entitled.Value = "Yes") Then
show 2, True
End If
End Sub
ed ecco il rollback button (esci senza salvare)
codice:
' Cancel edits -> do not save changes
Private Sub cmdRollback_Click()
' Rollback transaction
wksp.Rollback
' Close the form
DoCmd.Close acForm, "frm_cb_case"
End Sub