If Forms("销售计划录入2").Opened AndAlso e.NewRange.RowSel >= 0 Then
Dim r As Row = e.Table.Rows(e.NewRange.RowSel)
If r.DataRow.RowState <> DataRowState.Added AndAlso r.DataRow("XXX列") <> "销售开piao" 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