Solved

Refresh, Requery

Posted on 2013-12-05
2
336 Views
Last Modified: 2013-12-05
Experts, the below requery works but after requerying, it takes me to the first record.  I want to remain on the current record.  Is there some other way to do this without being too complicated?  

Private Sub FrameJV_Consort_DocsYN_AfterUpdate()

    'Me.Refresh 'doesnt work
     Me.Requery
   
End Sub
0
Comment
Question by:pdvsa
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39699602
you have first to save the record id to a variable then find it after the requery


Private Sub FrameJV_Consort_DocsYN_AfterUpdate()

dim vID
vID=Me.recordID  'change this with the correct name
     Me.Requery

with me.recordsetclone
     .findfirst "[recordID]= " & vID
      if not .nomatch then
          me.bookmark=.bookmark
      end if
end with
   
End Sub
0
 

Author Closing Comment

by:pdvsa
ID: 39699643
OK thank you....I thought it might have something to do with the bookmark.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question