Select name only once from combo box

LeoDee

Registered User.
Local time
Today, 03:47
Joined
Dec 4, 2002
Messages
31
I am scheduling tennis matches. Each match consists of 2 lines of singles and 3 lines of doubles. For each match I have 12 players to select from for 10 spots. I am using a combo box to select the players for each position. How can I preclude the selection of the same player twice? In other words, once a player has been selected and he/she is chosen again, I would like to see a message saying the player was already selected and give me the opportunity to override or not.

Thanks....
 
Are you retrieving the players' names from a table or a value list?
 
The combo box selects the players names from a table......
 
Okay, if you add a further field to that table, call it Active, and ensure that it is a Yes/No field.

Next,

You'll also need to change the RowSource of your combobox with the criteria that Active must be equal to false.

On the after update of the combobox on your form you can use a bit of code to set that person's active control to True, meaning they have been picked.

Finally, also in the after update you should requery the combobox and it should remove the last person picked.

If you need help with the actual coding then just say...
 

Users who are viewing this thread

Back
Top Bottom