程序运行时出现"至少一个参数没有被指定值"的提示,然后无法继续向下执行,请高手指点,急用啊!!
部分程序代码如下:
Private Sub ComboType_Click()
Dim strType As String
Dim strSql As String
Dim mFind As Boolean
'Dim mLogonSet As Recordset strType = Trim$(ComboType.Text)
If strType = "" Then
Exit Sub
End If
strSql = "select * from [制造系统参数表] where [产品型号] =" & strType
mFind = False
' On Error Resume Next
adoPara.RecordSource = strSql
adoPara.Refresh
Do Until adoPara.Recordset.EOF
mFind = True
Exit Do
Loop
medVbend_l.Text = adoPara.Recordset.Fields("最大弯曲速率(大头)")
............... End Sub
部分程序代码如下:
Private Sub ComboType_Click()
Dim strType As String
Dim strSql As String
Dim mFind As Boolean
'Dim mLogonSet As Recordset strType = Trim$(ComboType.Text)
If strType = "" Then
Exit Sub
End If
strSql = "select * from [制造系统参数表] where [产品型号] =" & strType
mFind = False
' On Error Resume Next
adoPara.RecordSource = strSql
adoPara.Refresh
Do Until adoPara.Recordset.EOF
mFind = True
Exit Do
Loop
medVbend_l.Text = adoPara.Recordset.Fields("最大弯曲速率(大头)")
............... End Sub
因该是sql语句不完整
adoPara.connectstring 你设置了吗?
改成strSql = "select * from [制造系统参数表] where [产品型号] ='" & strtype & "'"
即可