我在窗口的afterlaod事件中写了:
e.Form.Controls("CheckBox1").Enabled = False
e.Form.Controls("CheckBox2").Enabled = False
e.Form.Controls("Table1").Enabled = False
'若复核及完全录入为真则送货单不可再删除
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
但Checkbox1 或Checkbox2为真时,删除按钮都是可用的(我想在任一CHKBOX为真时删除按钮不可用),为啥? 请指点,谢谢