Private Sub data_DblClick(Cancel As Integer)
Dim id&
id = Me.Form.Recordset!id
With DBEngine(0)
.BeginTrans
.Databases(0).Execute "delete from sub_t where tid=" & id
.Databases(0).Execute "delete from t where id=" & id
If MsgBox("Удалить?", vbYesNo) = vbYes Then
.CommitTrans
Else
.Rollback
End If
End With
Me.Requery
End Sub |