Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Refresh, Requery

Posted on 2013-12-05
2
Medium Priority
?
342 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 2000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

721 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