Requery Reverts to First Record

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ffrippy
    New Member
    • Sep 2012
    • 16

    Requery Reverts to First Record

    Hi,

    I have a wee problem with acceess, when I filter records on a form (based on the value of a combo box) the record does not update on the form. If I 'Refresh' it does nothing, if I 'Requery' it reverts back to record 1. Is there a way I can get the record to update without reverting to record 1?

    Thanks for any advice.

    ffripp
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    There are several ways to accomplish this. My favorite is to Bookmark the Current Record, Requery, then return to it.
    Code:
    Dim varBookmark As Variant
    
    varBookmark = Me.Bookmark       'Bookmark the Current Record
    Me.Requery                      'Requery Record Source
    Me.Bookmark = varBookmark       'Return to Bookmark

    Comment

    Working...