If Forms("大货用量表").Opened() '一定要判断用于模拟关联表的窗口是否已经打开 Dim t As Table = Tables("配色表") Dim b As Table = Tables("配码表") With Tables("大货用量表_Table1") If .TopPosition > -1 Then '如果选定区域包括数据行 Dim ids As String = "" For i As Integer = .TopPosition To .BottomPosition ids &= "'" & .Rows(i)("物料基本信息_物料ID") & "'," Next t.Filter = "物料ID in (" & ids.trim(",") & ") " b.Filter = "物料ID in (" & ids.trim(",") & ") " End If End With End If
|