MultiPick List Box
by Bruce Riggs
CIS 76142,155
pcsys@caverns.com

12/20/1995
Submitted as freeware for your learning enjoyment. Designed in Access2.0. Should work in Access7.0 also.

INSTALLATION:
Print out this document to refer to as you explore the forms.
Open the file MULTILST.MDB in the directory of your choice.

The forms, tables, and queries were extracted from an Address Manager that I also posted here in the Forms library, as DIRPCS2.ZIP.  Some sample data from that application is included so you can see the forms work.

This is not a complete plug in module for your programs. I figured this out after much gnashing of teeth and pulling of hair, and thought someone would enjoy seeing my solution.

The main form "frmMultiPickMain" consists of an option group, a combo box, and two subforms. Each subform is itself a continuous form with three fields and a toggle button. The two large fields are "FullName" and "OrganizationName", one of which is visible depending on the value of the option group (buttons Org and Name).

The third field is underneath the toggle button, and is the key to the whole process. This hidden field "fldSelected" is a Yes/No field that takes its value from the button with the arrow.

In use, when a category is picked from cboSelCat, table "tblSelected" is cleaned out and then refilled with all ID's from "tblDirectory", and "fldSelected" is set to No for all records. The records that belong to the selected category are displayed in the "Available" box on the left.

Picking a record by clicking on the toggle button, changes "fldSelected" to Yes, and then requeries the "Selected" box on the right.

Unselect records by clicking the toggle buttons under "Selected". The above process is reversed.

You can put the form to use by making reference to Forms!frmMultiPickMain!frmMultiPickYes.Form, or to "qrySelectionsYes" while the form is open. (or figure out a better way yourself)

There is not a great deal to it, and it may avoid the overhead & problems with using an OCX control.

Enjoy