Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2007

    Question Unanswered: Speeding up record search

    Hi All,

    I have a basic search button that allows me to search my records to match the social security number I type in. Well, my one database has about 15k records in it, and needless to say, when I initially open that form and Click search, it takes about 10 seconds to initiate. Is there any way to speed this up? I have a front end and a back end. I've compacted and repaired. Is there anything else?

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    If you want to seach from a form based on a table (or query), try:
    Private Sub CommandSearch_Click()
        Dim lngNumber As Long
        Dim rst As DAO.Recordset
        lngNumber = InputBox("Number: ")
        If lngNumber > 0 Then
            Set rst = Me.RecordsetClone
    '       This is for a numeric field named SysCounter
            rst.FindFirst "SysCounter = " & lngNumber
    '       For a text field, use:
    '       rst.FindFirst "SomeField = '" & lngNumber & "'"
            If rst.NoMatch = False Then
                Me.Bookmark = rst.Bookmark
                MsgBox "Not found"
            End If
            Set rst = Nothing
        End If
    End Sub
    Have a nice day!

  3. #3
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    make certain the column is indexed
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts