If Forms("窗口1").Opened() '一定要判断用于模拟关联表的窗口是否已经打开 Dim t As Table = Tables("窗口1_Table1") With Tables("产品") If .Current Is Nothing Then t.Filter = "False" Else If .Current.Isnull("产品编号") Then t.Filter = "False" Else t.Filter = "产品编号 = " & .Current("产品编号") End If End If End With End If