"上级医师查房记录"表属性datacolchanged中如下代码
If e.DataCol.Name = "住院号" Then
If e.NewValue Is Nothing Then
e.DataRow("床号") = Nothing
Else
Dim dr As DataRow
dr = DataTables("住院记录").Find("[病人信息_床号] = '" & e.NewValue & "'")
If dr IsNot Nothing Then
e.DataRow("病人信息_床号") = dr("床号")
End If
End If
End If
If e.DataCol.Name = "住院号" Then
If e.NewValue Is Nothing Then
e.DataRow("姓名") = Nothing
Else
Dim dr As DataRow
dr = DataTables("住院记录").Find("[病人信息_姓名] = '" & e.NewValue & "'")
If dr IsNot Nothing Then
e.DataRow("病人信息_姓名") = dr("姓名")
End If
End If
执行时出现错误

此主题相关图片如下:1111.jpg