Results 1 to 5 of 5
  1. #1
    Sonarman2's Avatar
    Sonarman2 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Location
    NJ
    Posts
    2

    Unhappy Using Microsoft FIND in Access causing form to freeze...

    I have a form set up for editing member information. One function is set up to find a record using any field. Often (50% ??) the form will freeze after finding a requested record. The following is the VBA..
    Private Sub Find_Member_Click()
    On Error GoTo FindRecord_Click_Err

    DoCmd.RunCommand acCmdFind
    FindRecord_Click_Exit:
    Exit Sub

    FindRecord_Click_Err:
    MsgBox Error$
    Resume FindRecord_Click_Exit



    End Sub

    Seems simple enough. Has any one seen this behavior? Also at times after the freeze, the form starts to scroll up eventually returning to the first record. No linked tables are used with this form Records are sorted on Lastname, Firstname. Nothing fancy. It is not a large database, 2300 records each with 25 fields.

    I am looking at using a "Find" method using VBA without the system find function, creating my own Find Form. I have a version working that is used to locate groups of records based on 1 of 8 fields (field has to be selected prior to search).

    I am quite a novice here, learning on my own (age >> 65).

    Thanks
    S0narman2

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Dont use FIND. Use a select query. (its faster anyway)

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,615
    I've never used acCmdFind.

    Example code I use to find record on form:

    Private Sub cbxCommunities_AfterUpdate()
    'Find the record that matches the control.
    Me.RecordsetClone.FindFirst "Community = '" & Me.cbxCommunities & "'"
    If Not Me.RecordsetClone.EOF Then Me.Bookmark = Me.RecordsetClone.Bookmark
    Me.cbxCommunities = Null
    End Sub

    However, that is only for search on a single field. I have used comboboxes and textboxes and lots of VBA code to build a utility for searching on any field and/or combinations of fields.

    An alternative to RecordsetClone and bookmarks is to set form Filter and FilterOn properties.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I use DAO to create a clone of the form's recordset and then Bookmark.
    https://www.accessforums.net/forms/f...tml#post225865

  5. #5
    Sonarman2's Avatar
    Sonarman2 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Location
    NJ
    Posts
    2
    "Find" problem solved. Bookmarks and "FindNext" was the solution. Thanks for all your replies.

    Sonarman

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

Similar Threads

  1. Replies: 5
    Last Post: 05-04-2019, 09:02 PM
  2. Replies: 4
    Last Post: 12-27-2012, 02:10 PM
  3. Replies: 2
    Last Post: 09-07-2012, 03:57 PM
  4. Replies: 9
    Last Post: 06-08-2012, 07:52 AM
  5. Replies: 6
    Last Post: 10-30-2010, 08:42 AM

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