'如果刚刚输入的是值班日期列
If e.DataCol.Name = "值班日期" Then
Dim dr As DataRow
Dim dr2 As DataRow
Dim s1 As String
Dim s2 As String
'在值班日期例查找值班人员
dr = DataTables("值班排班表").Find("[值班日期] = '" & e.DataRow("值班日期") & "' and [时段区分]= '01上午'")
dr2 = DataTables("值班排班表").Find("[值班日期] = '" & e.DataRow("值班日期") & "' And [时段区分]= '02下午'")
If dr IsNot Nothing AndAlso dr2 IsNot Nothing Then '如果找到
'将找到行的区号?邮编内容填入到正在输入的行中.
s1 = dr("值班人员_姓名")
s2 = dr2("值班人员_姓名")
Else
s1 = Nothing
s2 = Nothing
End If
e.DataRow("值班员_00白天") = s1 & " " & s2
End If