设计了一款参数查询的系统,代码如下,但是运行会出现变量未定义或With块未设置的问题
Private Sub Command1_Click()Dim sname As Variant
sname = Text1.Text
Data1.Recordset.FindFirst "每齿进给量 like'" & sname & "'"
If Data1.Recordset.NoMatch Then MsgBox ("无此每齿进给量") 'MsgBox "无此每齿进给量", , -"提示"
End Sub
Private Sub Command2_Click()
铣削用量浏览.Show
End Sub
Private Sub Command3_Click()
Dim sname As Variant
sname = Text2.Text
Data1.Recordset.FindFirst "被加工材料 like'" & sname & "'"
If Data1.Recordset.NoMatch Then MsgBox "无此被加工材料", , "提示"
End Sub