I have a form which lets you type in criteria to search a table by.

On that form I have textboxes that I bind to that recordset after they input their criteria and hit a search button.

VB Code:
  1. Private Sub cmdSearch_Click()
  2.  
  3. If rsSearch.State = 1 Then rsSearch.Close
  4. rsSearch.Source = "SELECT * FROM MyTable WHERE MyField = '" & txtSearch.Text & "'"
  5. rsSearch.Open , connDB, adOpenStatus, adLockOptimistic
  6. Set textbox1.Datasource = rsSearch
  7.  
  8. End Sub

Now, I have about 30 controls with the datafields already set that I set the datasource to that recordset. It works fine..

My problem is, when they search a second time it goes REALLY slow. The only way I found to fix this was to set the controls datasource to Nothing before setting it to the RS.

Seemed to work great until I watched the memory usage go UP UP UP every time you searched. It does not do that if dont set the controls datasource to Nothing first though.. What can I do?? HELP!