删除最后一条记录时提示书签无效!!在线等
[size=24px][size=24px]这是我的代码myBookmark = mrc.Bookmark
str2$ = MsgBox("是否删除当前记录?", vbOKCancel, "删除当前记录")
If str2$ = vbOK Then
mrc.MoveNext
If mrc.EOF Then
mrc.MoveFirst
myBookmark = mrc.Bookmark
mrc.MoveLast
mrc.Delete
mrc.Bookmark = myBookmark
Call viewData
Else
myBookmark = mrc.Bookmark
mrc.MovePrevious
mrc.Delete '删除记录后,游标的位置不能确定??
mrc.Bookmark = myBookmark
Call viewData
End If
Else
mrc.Bookmark = myBookmark
Call viewData
End If[size=13px]
Private Sub viewData()
txtClassno.Text = mrc.Fields(0)
comboGrade.Text = mrc.Fields(1)
txtDirector.Text = mrc.Fields(2)
txtClassroom.Text = mrc.Fields(3)
End Sub
请高手指教!!在线等!!
补充:VB , 数据库(包含打印,安装,报表)