各位老师好!
下面表达式,是想当鼠标移动到A表的某行时,根据当前行的“mjzXM”(姓名)值,将指针定位到B表的“mjzXM”(姓名)值的行,我在A表的“PositionChanged”事件中写了这段表达式后,起不了作用,没有任何反应,请老师指导,谢谢!
If e.Table.Current Is Nothing Then '如果Current为Nothing
MessageBox.Show("您还未选择的具体行!", "提示")
Else
Dim XM As String = Tables("GLCSTJG").current("mjzXM")
Dim dr As DataRow
Output.Show(XM)
dr = DataTables("MJRYXXB").Find("[mjzXM] = 'XM'")
If dr IsNot Nothing Then
Dim wz As Integer = Tables("MJRYXXB").FindRow(dr)
If wz >= 0 Then
Tables("MJRYXXB").Position = wz
End If
End If
End If