title: Trouble limiting combobox dropdown list to search as you type results
body: <p>I am struggling with a combobox in MS Access.</p>
  <p><strong>Context</strong><br />
  Combobox used to select clients from table. The table has 3 columns, client first name, last name and company.</p>
  <p><strong>What I want</strong>:<br />
  The combobox dropdown list shows the 3 columns of a table. I want the dropdown list to display only the rows that match in any of the 3 columns what the user has typed in the combobox, so that the user has just to click on the line of his choice in the dropdownlist to select client he wants but can basicaly search on first name, last name or company name from the combobox.</p>
  <p><strong>What I have</strong><br />
  At the moment my combobox is doing search as you type from 2 characters and more. In order to not execute the search (it takes time) at each key stroke I only execute the SQL query if there is no change on the combobox for more than 750ms.</p>
  <p><strong>Code</strong></p>
  <pre><code>Public Sub FilterComboAsYouType(combo As ComboBox, defaultSQL As String)
  Dim strSQL As String
      If Len(combo.Text) &gt; 1 Then
          
          
          combo.RowSource = defaultSQL
          combo.Dropdown
      End If
      
  
  End Sub
  Private Sub Combo42_Change()
      Me.TimerInterval = 750
      
      
  End Sub
  Private Sub Form_Timer()
      Me.TimerInterval = 0
      FilterComboAsYouType Me.Combo42, &quot;SELECT [Client list].[Contact ID], [Client list].lastname, [Client list].firstname, [Client list].company FROM [Client list] WHERE ([Client list].firstname LIKE [Forms]![Client contacts]![Combo42] &amp; '%' OR [Client list].lastname LIKE [Forms]![Client contacts]![Combo42] &amp; '%' OR [Client list].company LIKE [Forms]![Client contacts]![Combo42] &amp; '%') ORDER BY [Client list].lastname, [Client list].firstname, [Client list].company;&quot;
      
  End Sub
  </code></pre>
  <p>Combobox non empty parameters ( Row source is set by code):</p>
  <pre><code>Control Source       | Contact ID
  Row Source Type      | Table/Query
  Bound Column         | 1
  Limit to List        | Yes
  Allow value list Edit| No
  Inherit Value List   | No
  Show Only Row source values | Yes 
  Enabled              | Yes
  Locked               | No
  Auto Expand          | No
  On Change            | [Event Procedure]
  Name                 | Combo42
  Tab Index            | 15
  Tab Stop             | Yes
  Allow AutoCorrect    | Yes
  IME Hold             | No
  IME Mode             | No control 
  IME Sentence Mode    | None
  </code></pre>
  <p><strong>Issue</strong><br />
  Currently the request does not seem to work, the dropdown of the combobox always seem to be the full table (in a scrollable fashion). The dropdown is made of the full table but the row presented will be the one matching the text content on the last name (only). I can then scroll the dropdown on the full table, and that's what I'd like to avoid. As the dropdown of the combobox is not modified and returned as full table, the criterias of the request are not executed, it is only pointing the the first row matching client last name with my text box, no matching of first name or company name is done at anytime.
  I tried to add a <code>combo.requery</code> to my <code>FilterComboAsYouType</code> Sub after setting the <code>RowSource</code> parameter but I have an <code>runtime error 2118</code> stating that i need to save the current field before requerying.</p>
  <p>Any clue on what I am missing?</p>