MS Access Using ComboBox Value in SQL Field
<p>Trying to set up a query where one of the fields is selected by the value in a combobox.  Can't figure out the right syntax.  I'm in the SQL view of the query builder, using the following:</p>

<pre><code>SELECT Deviations.Deviation, Deviations.Rev, Deviations.Title, Deviations.Issued, Deviations.ExpiryDate, Deviations.ExpiryHours, Deviations.ExpOther, Deviations.Active, Deviations.[Forms]![DeviationSelectionForm]![cmbAircraft]
FROM Deviations
WHERE Deviations.[Forms]![DeviationSelectionForm]![cmbAircraft]=True
ORDER BY Deviations.Deviation DESC
</code></pre>

<p>The combo box selects the tail number of the aircraft which is a checkbox in the table.  There are multiple aircraft tail numbers as checkbox fields.  So if there were no combobox and I wanted the query to use as example aircraft 416, the query would be:  </p>

<pre><code>SELECT Deviations.Deviation, Deviations.Rev, Deviations.Title, Deviations.Issued, Deviations.ExpiryDate, Deviations.ExpiryHours, Deviations.ExpOther, Deviations.Active, Deviations.[416]
FROM Deviations
WHERE Deviations.[416]=True
ORDER BY Deviations.Deviation DESC
</code></pre>

<p>When I test this query it works as I need it to.</p>

<p>So the question is how to I create the query with the combobox in a form identifying the field name of a table?</p>