在表事件datacolchanged中加入下面代码,执行“会员卡号”列不为空时,“充值日期”列显示电脑当时的时间
If e.DataCol.Name = "会员卡号" Then If e.DataRow.IsNull("会员卡号") Then e.DataRow("充值日期") = Nothing Else e.DataRow("充值日期") = e.Form.Controls(Date.Today)End IfEnd If
执行有问题,请老师给看一下代码