Private Sub cmdcancel_Click() rs_book.CancelUpdate DataGrid1.Refresh DataGrid1.AllowAddNew = False DataGrid1.AllowUpdate = False cmddel.Enabled = True cmdmodify.Enabled = True cmdupdate.Enabled = False cmdcancel.Enabled = FalseEnd Sub
Private Sub cmdmodify_Click() Dim answer As String On Error GoTo cmdmodify cmddel.Enabled = False cmdmodify.Enabled = False cmdupdate.Enabled = True cmdcancel.Enabled = True DataGrid1.AllowUpdate = True Exit Sub cmdmodify: If Err.Number <> 0 Then MsgBox Err.Description End If
Private Sub cmdmodify_Click() Dim answer As String On Error GoTo cmdmodify cmddel.Enabled = False cmdmodify.Enabled = False cmdupdate.Enabled = True cmdcancel.Enabled = True DataGrid1.AllowUpdate = True Exit Sub cmdmodify: If Err.Number <> 0 Then MsgBox Err.Description End If