Solved

Refresh, Requery

Posted on 2013-12-05
2
340 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
[X]
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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Outlook VBA question - How do I mark a message as read 2 60
Menus 6 57
Sharepoint list value updated via access or Excel 3 33
Reoccurring Access Query 24 47
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…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

759 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