DoCmd.SearchForRecord with multiple criteria in Access 2013
<p>I have a form pulling data off an SQL Server table. The form has two unbound comboboxes. Users first select from comboName, then comboDate, then the form will retrieve the record associated with the values.</p>

<pre><code>'comboDate AfterUpdate VBA macro
DoCmd.SearchForRecord , "", acFirst, "[Name] = " &amp; "'" &amp; comboName.Value &amp; "'" &amp; _
" and [Date] = " &amp; "'" &amp; Format(comboDate, "yyyy-mm-dd") &amp; "'"
</code></pre>

<p>If I use <code>Name = comboName.Value</code> alone it will retrieve the first record for that name, but if I add the <code>Date</code> criteria, or use the <code>Date</code> criteria without <code>Name</code>, the combobox will no longer retrieve the record. It just stays on the current one. I have already converted the Access date format to match the SQL Server. What else needs to be done?</p>