以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  多列关联  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=23405)

--  作者:hdf0913
--  发布时间:2012/9/11 14:26:00
--  多列关联

If Forms("采购goodsid").Opened() \'一定要判断用于模拟关联表的窗口是否已经打开
    Dim t As Table = Tables("采购明细")
    With Tables("采购输入_tabel1")
        If .Current Is Nothing Then
            t.Filter = "False"
        Else
            t.Filter = "采购单号 = \'" & .Current("采购单号") & "\'" 
            t.Filter = "货号 = \'" & .Current("货号") & "\'"
        End If
    End With
End If

 

要求是“采购单号”=“采购单号”,“货号”=“货号”(都是字符型)

上述代码对吗,主要是

            t.Filter = "采购单号 = \'" & .Current("采购单号") & "\'" 
            t.Filter = "货号 = \'" & .Current("货号") & "\'"
这句是这样吗?

 

 


--  作者:lin_hailun
--  发布时间:2012/9/11 14:42:00
--  
 楼主,你懂的。
--  作者:狐狸爸爸
--  发布时间:2012/9/11 16:06:00
--  

呵呵,楼主搞定了没有啊,建议好好看看:

http://www.foxtable.com/help/topics/1284.htm

 

 

If Forms("采购goodsid").Opened() \'一定要判断用于模拟关联表的窗口是否已经打开
    Dim t As Table = Tables("采购明细")
    With Tables("采购输入_tabel1")
        If .Current Is Nothing Then
            t.Filter = ""
        Else
            t.Filter = "采购单号 = \'" & .Current("采购单号") & "\' And 货号 = \'" & .Current("货号") & "\'"
        End If
    End With
End If