If Forms("主窗口").Opened Then '如果窗口已经打开 If e.Table.Current Is Nothing Then Return Dim dr As DataRow = e.Table.Current.DataRow Dim wz As Integer = Tables("主窗口_Table1").FindRow(dr) If wz >=0 Then systemready = False Tables("主窗口_Table1").Position = wz systemready = True Tables("主窗口_Table1").Refresh End If End If