Results 1 to 4 of 4
  1. #1
    khansolo is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Nov 2017
    Posts
    1

    Stay on the same record after requery

    Hi,
    I am working on a business tool for my team to solve communication issues. Using Access, I created a database, and am using a split form view. The purpose of the split form is to have one end of the team enter update their records, and have the other team view the results on the datasheet view (and visa versa), and quickly make their own changes in response to the feedback.


    The issue I am running into is that the timer I set up to requery every 30sec interferes when users are inputting data into the spreadsheet, and leads the user back to the first record post-requery.

    Code:
    Private Sub Form_Load()
    Code:
     Me.TimerInterval = 30000 End SubPrivate Sub Form_OnTimer() Me.Form.Requery Me.Refresh End Sub


    My ideal solution is where the records are requeried, but does not affect the user when in the process of updating records on either end of the shared network database.

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    This will help with the first part:

    http://www.baldyweb.com/Requery.htm

    Maybe you can test the dirty property of the form to see if the user is mid-edit.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    As Paul said, check to see if the user is in mid-edit, and if so, don't Requery, with something like this
    Code:
    Private Sub Form_OnTimer()
     If Not Me.Dirty Then
      'Your Requery code, per Paul, goes here 
     End If
    End Sub

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    There's your fish.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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: 2
    Last Post: 03-06-2015, 01:13 PM
  3. Requery But Stay on Same Record
    By burrina in forum Forms
    Replies: 1
    Last Post: 12-18-2012, 03:08 PM
  4. Requery Current Record ONLY
    By jle0003 in forum Queries
    Replies: 1
    Last Post: 10-17-2012, 12:45 PM
  5. Refilter form and stay on same record
    By ny1994rangers in forum Forms
    Replies: 1
    Last Post: 04-17-2012, 12:04 PM

Tags for this Thread

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