Dim sd As Date=e.Form.Controls("datetimepicker2").value
Dim ed As Date=e.Form.Controls("datetimepicker3").value
Dim Filter As String
With e.Form.Controls("datetimepicker2")
If .Value IsNot Nothing Then
If Filter>"" Then
Filter=Filter & " And "
End If
Filter=Filter & "订单日期>=#"& .Value &"#"
End If
End With
With e.Form.Controls("datetimepicker3")
If .Value IsNot Nothing Then
If Filter>"" Then
Filter=Filter & " And "
End If
Filter=Filter & "订单日期<=#"& .Value &"#"
End If
End With
With e.Form.Controls("dropbox2")
If .Value IsNot Nothing Then
If Filter>"" Then
Filter=Filter & " And "
End If
Filter=Filter & "供方编码 ='"& .Value &"'"
End If
End With
If Filter>"" Then
DataTables("采购订单_table2").LoadFilter=Filter
DataTables("采购订单_table2").Load
End If
之前用的数据源是ACCESS的,现在改为SQL SERVICE的,请问这个代码该怎么改?谢谢