title: MS Access Form Cascade Combo Box
body: <p>Let me preface this by acknowledging I'm a database, SQL and VBA newb. I've been tasked with hacking together something for which there is not external budget.</p>
  <p>I'm having issues setting up a simple combobox based on a simple 2 column query called <code>&quot;Immeubles&quot;</code> (buildings in French).</p>
  <p>The query features 2 columns that look for data in 2 different tables. One's called <code>&quot;Immeuble&quot;</code> (building in French), the other is called <code>&quot;Adresse&quot;</code> (address in French).</p>
  <p>In a form, I've set up the first Combo box to only show distinct results from the &quot;Immeuble&quot; column. This combobox's name is <code>&quot;cboListe_Immeuble&quot;</code>.</p>
  <p>I'd like for the second combo box to only show the address that corresponds to the &quot;Immeuble&quot; value in the first combo box. I've named this second combobox <code>&quot;cboListe_Adresse&quot;</code>.</p>
  <p>For this example, the &quot;Immeuble&quot; is called &quot;ROM 1&quot;, which has 3 corresponding adresses.</p>
  <p>I've tried 2 different ways:</p>
  <p>1st way.</p>
  <p>Using a simple query builder on the second combo box :</p>
  <pre><code>SELECT DISTINCT Immeubles.Adresse
  FROM Immeubles
  WHERE (((Immeubles.Adresse)=[Forms]![SELECTION]![cboListe_Immeuble]))
  ORDER BY Immeubles.Adresse;
  </code></pre>
  <p>2nd way.</p>
  <p>Coding in visual basic code.</p>
  <pre><code>Me.cboListe_adresse.RowSource = &quot;SELECT Immeubles.Adresse &quot; &amp; _
                            &quot;FROM qryImmeubles &quot; &amp; _
                            &quot;WHERE Immeubles.Immeuble = &quot; &amp; (Me.cboListe_Immeuble) &amp; _
                            &quot;ORDER BY Immeubles.Adresse&quot;
  </code></pre>
  <p>The first way doesn't work at all.</p>
  <p>The second way generates an error</p>
  <pre><code>Syntax error (missing operator) in query expression 'Immeuble = ROM 1ORDER BY Adresse'
  </code></pre>
  <p>At the end of the sub, I've added a requery line</p>
  <blockquote>
  <p>&quot;Me.cboListe_adresse.Requery&quot;</p>
  </blockquote>
  <p>What am I doing wrong?</p>