开发者

ms access 2003 navigate to absolute position of record

I would like to navigate to a record on a form by entering the 开发者_开发问答records absolute position in a textbox. So far miserable failure. Can anyone tell me how to do this?


You can use the recordset, or recordsetclone:

Set RS = frm.RecordsetClone
''Populate recordset
RS.MoveLast
RS.MoveFirst

If lngRecNo = 0 Or lngRecNo > RS.RecordCount Then
    MsgBox "Cannot go to the specified record." & vbCrLf _
    & "Please try again."
Else
    ''Counting from zero
    RS.AbsolutePosition = lngRecNo - 1
    frm.Bookmark = RS.Bookmark
End If
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜