' 移到上一条记录
Public Function rPrev()
On Error GoTo Err_Prev
DoCmd.GoToRecord , , acPrevious
Exit_Prev:
Exit Function
Err_Prev:
MsgBox Err.Description
Resume Exit_Prev
End Function
问题是没有【IE】的后退完善,来来去去都是两个位置啊,就像这样:
Private Sub 返回_Click()
On Error Resume Next
Me.Bookmark = prvBookmark
If 返回.Caption = "后退" Then
返回.Caption = "前进"
Else
返回.Caption = "后退"
End If
End Sub
Option Compare Database
Option Explicit
Dim newBookmark As Variant, prvBookmark As Variant
Private Sub Form_Current()
On Error Resume Next
prvBookmark = newBookmark
newBookmark = Me.Bookmark
End Sub