Unbound Combobox automatic requery?

R

Richard

What would need to be done to ensure an unbound combox recordsource is
requeried whenever the drop down arrow is clicked ?

Tried the following.

private sub MyCombo_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
MyCombo.Requery
end sub

The code does run (breakpoint), but any selection made does not get
put in the combobox, _and_ the requery does not appear to have
occurred (i.e. the dropdown list does not change).

The combo record source is a query.
Between first and second uses of the combo, the query results may
change due to some generic change in the database, such as:
- rows deleted, inserted or updated
- query design changed
 
M

Michel Walsh

You mean rowsource?

Me.ComboBoxName.RowSource = Me.ComboBoxName.RowSource


Hoping it may help,
Vanderghast, Access MVP
 

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