急需)如何设置时间查询
我用DTPicker控件与DataGrid加Adodc控件,如何使选中时间后数据能同时变;如Private Sub DTPicker1_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)Dim w As String '声明变量,用来保存SQL语句字符串
'如果没有选择部分信息,则退出
If DTPicker1.Text = "" Then
Exit Sub
End If
'DTPicker1.BoundText是当前的时间,
'以此编号设置SQL语句,读取此时间内的所有病人药品信息
w = "select * from dbo.AdviceListView where roomcode=2000 and intime= " _
+ DTPicker1.BoundText + "order by intime desc"
With Adodc1
.RecordSource = w
.Refresh
End With
End Sub
请各位帮我查一下
我按三断笛的改正后然不能用时间查询,现急用,请各位抽出点时间看一下
[[it] 本帖最后由 jxawgyl 于 2008-6-4 11:34 编辑 [/it]]