Dim filter As String filter ="Select a.nid As 送货单号,a.nRelationID As 销售单号, a.nclientid As 客户编号,b.sName As 客户名称,b.sAddr As 客户地址,b.sPhone As 联系电话,a.dOrderDate As 购物日期,a.dDeliverDate As 送货日期,d.sName As 商品名称及规格型号 ,c.nNumber As 数量,f.sName As 购买商场,e.sName As 发货仓库 from RT_Deliver a,CV_Client b ,RT_DeliverItem c,CT_Merchandise d,CT_Dept e,CT_Dept f where a.nClientID=b.nID And a.nID=c.nDeliverID And c.nMerchandiseID=d.nID And e.nID=c.nStoreHouseID And f.nID = a.nShopID And nClientType =1 And a.nAccountID = " & _Accountid & " and convert(Char(8),a.dOrderDate,112) >= convert(char(8),getdate(),112)" Tables("销售单据窗口_table1").Fill(filter,_name,True)
|