Combo boxes and queries

  • Thread starter Thread starter Phil Hood
  • Start date Start date
P

Phil Hood

I have a form with a combo box on it that is populated
from a query. This all works OK but when the query runs,
it not only populates the combo box but also opens in a
separate window in datasheet view.

Is there anyway of suppressing the datasheet?

Thanks

Phil.
 
I suspect someone has added code to the combo box' After
Update event to run this query. If you just want the
combo box to get its rows from this query, simply enter
the SQL into the CB's Row Source property, and adjust the
column widths as you like. An easy way to do this is with
the Combo Box wizard.

From form Design view, be sure Wizards are enabled (toggle
button of a wand and five stars on the Toolbox toolbar),
then add a new combo box and follow the prompts.

HTH
Kevin Sprinkel
 
Hi,

Many thanks for your help - you were right. I removed the
code from the event procedure and the combo box still
populates correctly but I no longer get the datasheet.

Thanks

Phil.
 
Back
Top