读书人

至少一个参数没有指定值?解决方案

发布时间: 2012-01-07 21:41:56 作者: rapoo

至少一个参数没有指定值?
代码如下:

Private Sub DataCombo1_Click(Area As Integer)
Dim strquery As String
If DataCombo1.Text = " " Then
Exit Sub
End If
strquery = "select * from [application] where [dept]=datecombo1.BoundText "
With Adodc2
.RecordSource = strquery
.Refresh
End With
End Sub

提示至少一个参数没有指定值,对象 "refresh "的方法 "iadodc "失败
[dept]是部门名称(中文字符)
上面SQL语句我该如何写?
谢谢


[解决办法]
strquery = "select * from [application] where [dept]= ' "& datecombo1.BoundText & " ' "

读书人网 >VB

热点推荐