以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助] 我是新手求助代码问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=116692)

--  作者:cool314156
--  发布时间:2018/3/29 14:24:00
--  [求助] 我是新手求助代码问题
Dim dt1 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker")
Dim dt2 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker1")
Dim Filter As String
Filter = "入库时间 >= #" & dt1.value  & "# And 入库时间 <= #" & dt2.value & "#"   
DataTables("入库").LoadFilter = Filter And "入库类型 = & 采购入库 & " 
DataTables("入库").Load()

求教下,我的代码错在哪里了


--  作者:有点甜
--  发布时间:2018/3/29 14:28:00
--  
Dim dt1 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker")
Dim dt2 As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker1")
Dim Filter As String
Filter = "入库时间 >= #" & dt1.value  & "# And 入库时间 <= #" & dt2.value & "#"   
DataTables("入库").LoadFilter = Filter & " and 入库类型 = \'采购入库\' " 
DataTables("入库").Load()