
出错!BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录~
源码:PrivateSubCommand2_Click()DimdeleAsStringAdodc1.ConnectionString="Provider=Microso...
源码:
Private Sub Command2_Click()
Dim dele As String
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from TestTypeSet "
If Adodc1.Recordset.RecordCount > 0 Then
dele = MsgBox("确定删除吗?", vbYesNo + vbInformation, "系统提示")
If dele = vbYes Then
Adodc1.Recordset.Delete
Unload Me
Adodc1.Refresh
Else
End If
Else
MsgBox "数据库中没有记录要删除", , "系统提示"
End If
End Sub
错误指在 Adodc1.Recordset.Delete 展开
Private Sub Command2_Click()
Dim dele As String
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from TestTypeSet "
If Adodc1.Recordset.RecordCount > 0 Then
dele = MsgBox("确定删除吗?", vbYesNo + vbInformation, "系统提示")
If dele = vbYes Then
Adodc1.Recordset.Delete
Unload Me
Adodc1.Refresh
Else
End If
Else
MsgBox "数据库中没有记录要删除", , "系统提示"
End If
End Sub
错误指在 Adodc1.Recordset.Delete 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏20(财富值+成长值)
展开全部
Private Sub Command2_Click()
Dim dele As String
dele = MsgBox("确定删除吗?", vbYesNo + vbInformation, "系统提示")
If dele = vbYes Then
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "Delete from TestTypeSet "
Adodc1.Refresh
End If
End Sub
Dim dele As String
dele = MsgBox("确定删除吗?", vbYesNo + vbInformation, "系统提示")
If dele = vbYes Then
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "Delete from TestTypeSet "
Adodc1.Refresh
End If
End Sub
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询