If e.Table.Current Is Nothing Then '如果Current为Nothing
Return '则返回
End If
Dim wz As Integer
Dim dr As DataRow
dr = DataTables("Table2").Find("[编号] = '" & e.Table.Current("编号") & "' And [日期] = #" & e.Table.Current("日期") & "#")
If dr Is Nothing Then
Dim drs = DataTables("Table2").AppendLoad("[编号] = '" & e.Table.Current("编号") & "' And [日期] = #" & e.Table.Current("日期") & "#").
If drs.count > 0 Then
dr = drs(0)
Else
Return
End If
End If
wz = Tables("Table2").FindRow(dr)
If wz >= 0 Then
Tables("Table2").Position = wz
End If