combobox rowsource

  • Thread starter J Holtendehouzer
  • Start date
J

J Holtendehouzer

I have a combobox and a listbox. I want the user to be able to select a
value from the combobox, which leads to a wizard that adds that value and
its association info to the listbox. Then, I want to remove the item we
just sent to the listbox from the combobox.

Right now, I'm looping through the items in the listbox and adding a clause
to the WHERE statement in the SQL of the combobox (i.e., the WHERE looks
like "WHERE (Not ItemID = 12) AND (Not ItemID=13) AND (Not ItemID=17)..."

Is there a better way to select rows from a table that aren't in another
table (the wizard writes the value to a table that becomes the rowsource of
the listbox)?

Thanks!
Joe
 
D

david epsom dot com dot au

Select tbl_Combo.* from
tbl_combo left join tbl_list
on tbl_combo.itemID = tbl_list.itemID
where tbl_list.itemID is null

(david)
 

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