From what I can tell Access Database that I've inherited / been working on has serious problems with its searching forms; its actively searching every keystroke, meaning that for each number in 984358 the code searches through the 100,000+ records once, scanning for each instance of 9, 98, 984... etc.
Quite frankly, its slow. I've taken a look at the VBA code in the search form; the code centered on the search box looks like this:
I'm fairly new to VBA, so is there any way to stop this procedure from doing 600,000+ comparisons. Some ideas I've had was to implement a delaying function to wait until all the numebrs have been typed in, or passing the string to be searched to a command button that initiates the search.
Any ideas?
Quite frankly, its slow. I've taken a look at the VBA code in the search form; the code centered on the search box looks like this:
Code:
Sub txtSearch_Change()
Me.txtSearch = Me.txtSearch.Text
Me.Cmb_Search = vSearchString
Me.[frmsearch].Requery
End Sub
Any ideas?