用这个函数:
http://www.foxtable.com/webhelp/scr/0320.htm
需要写代码:
http://www.foxtable.com/webhelp/scr/1452.htm
If e.DataCol.Name = "身份证号码"
Then
'是身份证号码发生变化吗?
If e.DataRow.IsNull("身份证号码") Then
'身份证号码是否为空
e.DataRow("出生日期") = Nothing
'如果为空,则清除出生日期
Else
'否则从身份证号码列中提取出生日期
e.DataRow("出生日期") = ReadBirthday(e.DataRow("身份证号码"))
End
If
End
If