前辈帮我看看这个问题出在哪里?
Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 0
On Error GoTo err1
Adodc1.Recordset.UpdateBatch adAffectAll
Case 1
On Error GoTo err1
Adodc1.Refresh
Case 2
aa = InputBox( "查找附件编号: ", "* ")
If aa <> "* " Then
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.Find "附件编号 like ' " & aa & "* ' "
End If
End Select
Exit Sub
err1:
MsgBox Err.Description
End Sub
给车间做的一个数据库管理软件,
这个是修改模块中按键的代码,
在运行到:Adodc1.Recordset.MoveFirst 这里的时候提示错误91,
with变量什么的。
请高手帮忙看看问题出在哪里?谢谢!!
[解决办法]
假如是SQl数据库 :
Adodc1.Recordset.Find "附件编号 like '% " & aa & "% ' "
if adodc1.Recordset.RecordCount <> 0 then
Adodc1.Recordset.MoveFirst
end if
[解决办法]
if adodc1.Recordset.RecordCount <> 0 then
Adodc1.Recordset.MoveFirst
end if
做一个判断试试看
前辈帮小弟我看看这个有关问题出在哪里
前辈帮我看看这个问题出在哪里?PrivateSubCommand1_Click(IndexAsInteger)SelectCaseIndexCase0OnErrorGoT
