红袍老师,我在表属性AfterselChange加入以下代码,发现窗体控件变成不可用了,这可怎么改?If Forms("销售计划录入2").Opened AndAlso e.NewRange.RowSel >= 0 Then
Dim r As Row = e.Table.Rows(e.NewRange.RowSel)
If Tables("JHS").Current IsNot Nothing Then
Forms("销售计划录入2").Controls("ComboBox3").Enabled = False
Forms("销售计划录入2").Controls("ComboBox1").Enabled = False
Forms("销售计划录入2").Controls("ComboBox2").Enabled = False
Forms("销售计划录入2").Controls("子客户").Enabled = False
Forms("销售计划录入2").Controls("数量").Enabled = False
Forms("销售计划录入2").Controls("textbox1").Enabled = False
Else
Forms("销售计划录入2").Controls("ComboBox3").Enabled = True
Forms("销售计划录入2").Controls("ComboBox1").Enabled = True
Forms("销售计划录入2").Controls("ComboBox2").Enabled = True
Forms("销售计划录入2").Controls("子客户").Enabled = True
Forms("销售计划录入2").Controls("数量").Enabled = True
Forms("销售计划录入2").Controls("textbox1").Enabled = True
End If
End If