如何跨表引用录入,在“”特体学生”表中,当选择班级时引用“学生信息”表中的信息,出现对应的学生,选择学生后能讲给学生的相关性信息填到“特体学生表中那个对应的列中”现在当选择了班级时,无法出现该班的学生。
If e.DataCol.Name = "班级" Then
If e.NewValue Is Nothing Then
e.DataRow("学生姓名") = Nothing
e.DataRow("身份证号码") = Nothing
e.DataRow("身份证号码") = Nothing
Else
Dim dr As DataRow
dr = DataTables("学生信息").Find("[班级] = '" & e.NewValue & "'")
If dr IsNot Nothing
e.DataRow("身份证号码") = dr("身份证件号")
e.DataRow("民族") = dr("民族")
e.DataRow("性别") = dr("性别")
e.DataRow("出生日期") = dr("出生日期")
End If
End If
End If