以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  手工编码填充数据  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=169575)

--  作者:BATASC750206
--  发布时间:2021/6/21 18:09:00
--  手工编码填充数据
Dim Cols1() As String = {"订单号","客户名称","产品代码","子件代码","子件名称","子件规格","下单日期","订单交期","订单数量","生产数量","单位","单位用量","材质"}
Dim Cols2() As String = {"订单号","客户名称","产品代码","子件代码","子件名称","子件规格","下单日期","订单交期","订单数量","生产数量","单位","单位用量","材质"}
For Each dr1 As DataRow In DataTables("MRP查询").Select("[下单日期]=Date() And [生产数量] > 0")
    Dim dr2 As DataRow = DataTables("MRP物料需求").AddNew()
    For i As Integer = 0 To Cols1.Length -1
        dr2(Cols2(i)) = dr1(Cols1(i))
    Next
Next
这个是个按钮代码,我想点击一下这个按钮,会自动填充“系统当日日期”的相关资料,即:[下单日期]=系统日期,请问这个代码要怎么改?填充颜色的有问题
请指教,谢谢!

--  作者:有点蓝
--  发布时间:2021/6/21 19:48:00
--  
For Each dr1 As DataRow In DataTables("MRP查询").Select("[下单日期]=#" & date.today & "# And [生产数量] > 0")