Dim chk As WinForm.CheckBox = e.Form.Controls("需要录入码单")
Dim mdbj As WinForm.Button = e.Form.Controls("码单编辑")
Dim mdhfz As WinForm.Button = e.Form.Controls("码单行复制")
Dim maqr As WinForm.Button = e.Form.Controls("码单保存")
Dim mdsc As WinForm.Button = e.Form.Controls("码单删除")
Dim mdzj As WinForm.Button = e.Form.Controls("码单增加")
If Tables("入库").Current.DataRow.GetChildRows("入库明细").count > 0 Then
If chk.Checked = True Then
mdbj.Enabled = True
mdhfz.Enabled = True
maqr.Enabled = True
mdsc.Enabled = True
mdzj.Enabled = True
Tables("入库明细码单").AllowEdit = True
If Tables("入库").Current.DataRow.GetChildRows("入库明细").Count = 0 Then
chk.Checked = False
mdbj.Enabled = False
mdhfz.Enabled = False
maqr.Enabled = False
mdsc.Enabled = False
mdzj.Enabled = False
Tables("入库明细码单").AllowEdit = False
End If
End If
End If
入库明细有数据时可以CheckBox勾选,入库明细没有数据时CheckBox不能勾选,代码没有作用请老师看看