ACCESS 回到刷新之前的记录

    Dim ID As Long
    ID = Me.FMTempMessage.Form.UserID
    Me.FMTempMessage.Form.Requery

    Dim rs As Recordset
    Set rs = Me.FMTempMessage.Form.Recordset
    rs.MoveFirst
    rs.FindFirst "UserID = " & ID
    If Not rs.NoMatch Then
        Me.FMTempMessage.Form.Bookmark = rs.Bookmark
    End If

    Set rs = Nothing

思考题:  如果要定位的记录不存在,请将光标移动到上一条记录或者下一条记录

posted @ 2024-06-07 22:59  一曲轻扬  阅读(11)  评论(0编辑  收藏  举报