Combo boxes and queries

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.
 
K

Kevin Sprinkel

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
 
K

Kevin Sprinkel

Also, please post any event procedure code attached to
your current combo box.
 
P

Phil Hood

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top