Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Refresh, Requery

Posted on 2013-12-05
2
338 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

837 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