Combo / List Box Switches (1 Viewer)

Status
Not open for further replies.

ajetrumpet

Banned
Local time
Today, 16:06
Joined
Jun 22, 2007
Messages
5,640
Every once in a while, the forum gets a question that says something like this:


"I have two combo boxes. One contains a list of installed software programs, and the other contains a list of programs that are not yet installed. What I want to do is when I install a program and select it from its list, have it be removed from the "uninstalled" combo box list and appear in the other one. How do I do this?"


I solved this problem long ago for somebody, and I think the attached sample is a pretty good one to show the programming you can use to accomplish the same thing. The code used for both combo boxes is exactly the same, just reversed with regard to control referencing.

The above example, as well as in my attachment, only uses one table field as the source data for switching the values from one combo to the other. When a value is selected from either combo, it is automatically transferred to the other one. This is done by manipulating SQL statements for the Rowsources. It can also be done for value lists, which I will likely post at a later date, because it is more difficult to program.

This can be done with combo boxes or list boxes. Same procedure for both...
 

Attachments

  • Combo Box Switch (by SQL statement).zip
    16.8 KB · Views: 473
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom