ACCESS 回到重新整理之前的記錄

一曲轻扬發表於2024-06-07
    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

思考題:  如果要定位的記錄不存在,請將游標移動到上一條記錄或者下一條記錄

相關文章