Foxtable(狐表)用户栏目专家坐堂 → 设置动态列表问题请教,急!


  共有10154人关注过本帖平板打印复制链接

主题:设置动态列表问题请教,急!

帅哥哟,离线,有人找我吗?
don
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:八尾狐 帖子:1812 积分:12999 威望:0 精华:14 注册:2008/10/11 18:07:00
  发帖心情 Post By:2012/7/12 16:20:00 [只看该作者]

用窗口可以:

If Forms("窗口1").opened Then
    Dim t1 As Table=Tables("窗口1_Table1")
    Dim ID As Integer = e.Table.Current("Code")
    Dim sql,Lms,s1 As String
    If id >0 Then
        Lms =DataTables("工序明细").GetComboListString("WOrderName","MainCode =" & Id,"_sortKey")
        For Each s1 In Lms.split("|")
            sql+=",Sum(iif(WOrderName ='" & s1 & "',FinishAmount,0)) As " & s1
        Next
        sql="Select  a.*," & Lms.Replace("|",",") & " From(Select Code As 电脑序号,wupingBM As  物品编码,Finish2 As 订单日期," _
        & "amount As 订单数  From{工序单} Where Code = " & ID & ") a INNER Join (Select MainCode " & sql & " From{工序明细} " _
        & "Where MainCode = " & Id & " Group By MainCode) b ON a.电脑序号 = b.MainCode"
        t1.Fill(sql,"",True)
    End If
End If

 回到顶部
总数 14 1 2 下一页