Solved

Refresh, Requery

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

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility
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
Comment Utility
OK thank you....I thought it might have something to do with the bookmark.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now