How to synchronize combo boxes?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!

I have an unbound combo box with a Query RowSource with LimitToList set to
True.

What I want is to make sure that the combo box stays current with the
underlaying data that the query selects from.

I have a mechanism setup already that explicitly calls a form's procedure
when that data changes. So far, in that proecdure I do
"Me.MyComboBox.Requery".

That updats the drop-down list on the combo box, but if the current combo
box Value is no longer in the list, it is allowed to stay there. I want to
set that Value to Null if it is no longer valid (but keep it if it is ok).

Any ideas on what to do, short of doing DCount("*", ...)? I would hate the
DCount route since:
a) the "Domain" for the combo box is a JOIN
b) The "WHERE" predicate changes a lot (this is not a static rowsource -- I
change it depending on user input)
c) It seems too slow.

So, am I overlooking something?

- Igor
 
Back
Top