以下是引用大红袍在2015/8/9 15:53:00的发言:
填入老师、学生以后,再填入分类,再带出具体课程内容
If e.DataCol.Name = "学员姓名" Then
If e.NewValue Is Nothing Then
e.DataRow("授课内容") = Nothing
Else
Dim dr3 As DataRow
dr3 = DataTables("学员一览表").Find("姓名 = '" & e.DataRow("学员姓名") & "'")
If dr3 IsNot Nothing Then
e.DataRow("授课内容") = dr3("课程")
End If
End If
End If
If e.DataCol.Name = "授课内容" Then
If e.NewValue Is Nothing Then
e.DataRow("培训科目") = Nothing
Else
Dim dr1 As DataRow
dr1 = DataTables("课类分类表").Find("科目 = '" & e.DataRow("授课内容") & "'")
If dr1 IsNot Nothing Then
e.DataRow("培训科目") = dr1("培训科目")
e.DataRow("签到时间") = Date.Today
e.DataRow("签到次数") = 1
End If
End If
End If
这段命令前面再加个IF吗??
还是把这段命令 改去窗口?