这段代码应该写到CheckBox1、CheckBox2的checkedchanged
Dim chk1 As WinForm.CheckBox
chk1 = e.Form.Controls("CheckBox1")
Dim chk2 As WinForm.CheckBox
chk2 = e.Form.Controls("CheckBox2")
If chk1.Checked = True Or chk2.Checked = True Then
e.Form.Controls("Button1").Enabled = False '删除按钮不起作用
End If