以下是引用狐狸爸爸在2013-11-23 12:46:00的发言:
设置MainTableChanged事件:
if MainTable.Name = "表B" Then
if Tables("表A.表B").Current IsNot Nothing Then
Dim dr As DataRow = Tables("表A.表B").Current.DataRow
Dim wz As Integer = Tables("表B").FindRow(dr)
If wz >= 0 Then
Tables("表B").Position = wz
End If
End If
End If
这个代码能内置就好了。