关于myBookmark
关于 Dim myBookmark As Variant ,为什么要把标签定义成为变体数据型?
谁能帮我解释一下,为什么在下面这段代码中出现了很多的myBookmark = mrc.Bookmark和mrc.Bookmark = myBookmark,
它们之间有什么分别?
Private Sub cmdDelete_Click()
myBookmark = mrc.Bookmark
If MsgBox("是否删除当前记录?", 1, "删除当前记录") = 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
End Sub