Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:跨表如何设置

1楼
明丰 发表于:2011/5/30 21:24:00

问题:

 

1:当“货品资料”表的“比率填充为批次”列打勾,采购进货单的 批次列=比率列 ,如何设置?

 

2:当“采购进货单”表的“批次设置”列打勾时,以“批次、生产日期、规格、颜色”列为对应列在“库存商品批次汇总表”创建批次,但不能重复。附件中 采购进货单表 批次设置列 多次点击时,“库存商品批次汇总表”会出现多条相同记录,请帮忙修改,谢谢!

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:测试16.table

2楼
狐狸爸爸 发表于:2011/5/31 8:54:00
If e.DataCol.Name = "批次设置"  AndAlso e.DataRow("批次设置")  = True Then '复制行'
    For Each dc As DataCol In DataTables("库存商品批次汇总表").DataCols
        If e.DataTable.DataCols.Contains(dc.Name) AndAlso e.DataRow.IsNull(dc.name) Then
            messagebox.show("请先输入" & dc.name)
            Return
        End If
    Next
    If e.DataRow.IsNull("生产日期") = False Then
        Dim dr As DataRow = DataTables("库存商品批次汇总表").Find("货品编号 = '" & e.DataRow("货品编号") & "' And 批次 = '" & e.DataRow("批次")  & "'And 生产日期 = '" & e.DataRow("生产日期")  & "'And 规格 = '" & e.DataRow("规格") & "'And 型号 = '" & e.DataRow("型号") & "'")
        If dr IsNot Nothing
            Tables("库存商品批次汇总表").Position = Tables("库存商品批次汇总表").FindRow(dr)
        Else
            Dim r As Row = Tables("库存商品批次汇总表").AddNew()
            For Each dc As DataCol In DataTables("库存商品批次汇总表").DataCols
                If e.DataTable.DataCols.Contains(dc.Name) Then
                    r(dc.name) = e.DataRow(dc.name)
                End If
            Next
        End If
    End If
End If
Select Case e.DataCol.Name
    Case "货品编号","比率"
        Dim dr As DataRow = DataTables("货品资料").Find("货品编号 = '" & e.DataRow("货品编号") & "'")
        If dr IsNot Nothing AndAlso dr("比率填充为批次") = True
            e.DataRow("批次") =e.DataRow("比率")
        End If
End Select
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03516 s, 3 queries.