这两行代码怎么写才正确呢,请老师指教。
If e.Row.IsNull("DateTimePicker1") Then 判断这个控件不是否为空值
e.Row("NumericComboBox12") = Date.Today.Year - e.Row("DateTimePicker1").Year - 1 代码写在控件事件中
1、
If tables("DateTimePicker1这个控件绑定的表的名称").current.IsNull("DateTimePicker1这个控件绑定的列的名称") Then
如果没有绑定
if e.form.controls(
"DateTimePicker1").text = ""
2、
tables("NumericComboBox12这个控件绑定的表的名称").current("NumericComboBox12这个控件绑定的列的名称") = Date.Today.Year - tables("DateTimePicker1这个控件绑定的表的名称").current("DateTimePicker1这个控件绑定的列的名称").Year - 1
如果没有绑定
e.form.controls(
"NumericComboBox12").value =
Date.Today.Year - - e.form.controls(
"DateTimePicker1").
Year - 1
[此贴子已经被作者于2023/12/24 18:20:11编辑过]
[此贴子已经被作者于2023/12/24 18:20:37编辑过]
If e.form.controls("DateTimePicker1").text = "" Then
日期控件没有值,或者没有选高级教师和一级教师这两个条件
[此贴子已经被作者于2023/12/24 18:21:10编辑过]