Query Update Limits List Box Choices

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

Guest

What I have is a query. A combo box uses this query. What I want to do is
build a filter so that when I choose one item from the combo box to place in
a field of a table the next time I open the drop down list of the combo box,
the item used does not show. The only time the item would show is when I
clear it from the table.

First, how do I build the filter to update the the query?
 
Hi,


The ComboBox RowSource property can be assigned, at run time, with a valid
SQL statement (as a string).


Me.ComboBoxName.RowSource = "SELECT a.whatever FROM a WHERE a.whatever NOT
IN (SELECT b.whatever FROM b)"


Sure, you can use an outer join, as produced by the wizard about finding row
in one table but not in another one, instead of the NOT IN construction
shown here.



You have to determine where that line of VBA code has to be... probably the
GotFocus event of the combo box would be nice.




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top