Results 1 to 6 of 6
  1. #1
    Turncloud is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2013
    Posts
    22

    Jump to a record (using .findrecord is slow for runtime users

    I have a small database application with only around 375 records. There is a form with a list view that has a button which jumps to a detail view of the relevant record.

    The code I use for this is;

    Private Sub btn_detail_Click()
    Dim temp_ref As String
    temp_ref = Me.Reference.Value
    DoCmd.OpenForm "Supp_main_detail"
    'The next line opens the selected record
    DoCmd.FindRecord temp_ref, acAnywhere, , acSearchAll, , acAll
    End Sub

    This seems to work fine, but users are complaining of a delay of 3-5 seconds on pressing the button. I've confirmed it's there, but only for those users running Access 2013 runtime. If you have the full version of Access it's instant. Data is split and is in the same place for both groups. Development is in Access 2016.

    Any ideas - is the FindRecord command the fastest way to do it?

    regards
    Simon

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Don't use FIND, just filter the list to see all records,..

    Code:
    Private sub txtFind_afterupdate()
       If isnull(txtFind) then 
           Me.filterOn= false
       Else
           Me.filter ="[field]='" & txtFind & "'"
            Me.filterOn= true
       End if
    end sub

  3. #3
    Turncloud is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2013
    Posts
    22
    Changed it to this, but it filters the list form not the detail form

    Private Sub btn_detail_Click()
    Dim temp_ref As String
    temp_ref = Me.Reference.Value
    DoCmd.OpenForm "Supp_main_detail"
    'The next line opens the selected record
    ' DoCmd.FindRecord temp_ref, acAnywhere, , acSearchAll, , acAll
    Me.Filter = "[reference]='" & temp_ref & "'"
    Me.FilterOn = True

    End Sub

  4. #4
    Turncloud is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2013
    Posts
    22
    Got it - this seems to work

    Private Sub btn_detail_Click()
    Dim temp_ref As String
    temp_ref = Me.Reference.Value
    'The next line opens the selected record
    DoCmd.OpenForm "Supp_main_detail", , , "[Reference] = '" & temp_ref & "'"

    End Sub

  5. #5
    Turncloud is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2013
    Posts
    22
    I spoke too soon - this creates a filter (which is fine) but when I remove the filter it jumps to the first record, which is not what I want. I want to remove the filter but stay on the current record.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Maybe this link will help: http://www.baldyweb.com/Bookmark.htm

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

Similar Threads

  1. How to Open form and jump to certain record?
    By behnam in forum Programming
    Replies: 3
    Last Post: 06-05-2014, 08:45 AM
  2. Using a Combo Box to jump to a record
    By Access_Novice in forum Forms
    Replies: 3
    Last Post: 11-19-2013, 04:14 PM
  3. Text Box - Jump to Record
    By drow in forum Forms
    Replies: 5
    Last Post: 03-12-2012, 11:25 PM
  4. How to jump on a new record when forms open?
    By braveali in forum Programming
    Replies: 3
    Last Post: 02-21-2012, 08:17 AM
  5. slow performance with multiple users
    By netgrim in forum Access
    Replies: 4
    Last Post: 05-16-2010, 05:41 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