Combo box with changing content

M

maxbrit

Hello

We have a form that a user has designed that has 15 combo boxes on, the
table the combo box refers to has 15 items in it.

This means that a user could select the same item 15 times.

How can we configure the form/combo box so that once an item has been
selected it will not appear in the next combo box dropdown list?

Thanks for any help.

Max
 
C

ChrisM

First of all, when you say 'configure' I imagine that you do not really want
to write code.
There may be a way to do this without writing any code, but I don't know it.
However there are a couple of methods requireing a small amount of code that
you could consider:

Instead having combo boxes 'Bound' to the table(I assume this is what you
have at the moment), you could create them as unbound and load the values in
via code.
This would give you much more control over what is in them, you could use
the 'RemoveItem' method to take values out that had been selected elsewhere.


Or I suppose you could change the query (in code) that the ComboBoxes are
based on:

SELECT ComboValue FROM myTable
WHERE ComboValue not in ('<combo1.Text>','<combo2.Text ... etc)

You would have to build that 'not in' string somehow, mybe a function or
somthing, and you would have to make sure that it got refreshed everytime a
value in one of the comboboxes got changed.

ChrisM
 
V

Van T. Dinh

It sounds to me a Multi-Select ListBox is much more convenient in this case.

Check Access Help on the ListBox and the Multi-Select Property.
 

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

Similar Threads

Combo Box Question 4
Combo Box and First Record 5
Combo box item selesction 3
Dsiplay a combo box 1
Combo box questions 2
Combo Box 3
Cascading Dependant combo boxes 0
Combo Box Help 7

Top