Results 1 to 2 of 2
  1. #1
    siwilsonchan is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1

    Remain on current record after requery

    Hello,



    I know almost nothing about programming, but I really need some help with what I am trying to do.

    I've been trying to figure out how to do this for a couple of days now. I tried searching through this forum, but I just can't seem to be able to apply the methods discussed here to my work.

    I am trying to add a command box in which I could requery my record. I was able to accomplish this by typing "me.requery" under build event. However, whenever I click on the command box, the record refreshes, but it goes back to the first record. How do I requery but stay on the current record?

    Click image for larger version. 

Name:	2018-05-15 (2).jpg 
Views:	8 
Size:	211.7 KB 
ID:	34029 Click image for larger version. 

Name:	2018-05-15 (1).jpg 
Views:	7 
Size:	113.2 KB 
ID:	34030

    Thank you for your time,

    Wilson

  2. #2
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    That is how requery works
    This is a very commonly asked question & if you do a site search you will see many responses & work-rounds.
    For example, try looking at the links at the bottom of this page
    Solutions include storing the current record number before requerying then returning to that record after requerying

    If you are trying to 'refresh after a 'calculation' you can use Recalc instead - it stays on the same record
    There are also Repaint & Refresh commands which do similar but not identical things

    See http://www.projectperfect.com.au/blo...h-and-repaint/
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 11
    Last Post: 04-09-2016, 08:54 PM
  2. Replies: 5
    Last Post: 12-15-2015, 05:01 AM
  3. Calcuate How many days remain in sharepoint
    By sdc1234 in forum SharePoint
    Replies: 2
    Last Post: 10-01-2014, 05:51 AM
  4. Requery Current Record ONLY
    By jle0003 in forum Queries
    Replies: 1
    Last Post: 10-17-2012, 12:45 PM
  5. Remain on Current Record
    By billgyrotech in forum Forms
    Replies: 17
    Last Post: 08-08-2011, 12:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums