代码放在TextBox的valuechanged事件中
Dim A1 As String = e.Form.Controls("AAA").ValueIf A1 = "" e.Form.Controls("BB").Enabled = False
Else
e.Form.Controls("BB").Enabled = TrueEnd If