VB问题求教:SQL条件使用DTPicker1.Value值查询显示数据问题?
command1的代码
Dim txt2 As String
Dim txt1 As String
On Error GoTo err01
txt1 = CDate(DTPicker1
.Value)
txt2 = "select 日期,物品名称,金额,单位,数量,购买地 from many where 日期=" & txt1 & ""
Adodc1.RecordSource = txt2
Adodc1.Refresh
err01:
If Err.Number = 3726 Then
MsgBox "输入不存在的,或者找不到该记录!"
End If
通过以上查询,数据无显示呀!