Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2007

Tip: Looking for answers? Try searching our database.

Multi-Select List Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ripper - 16 May 2007 05:52 GMT
I read and read the newsgroups, but I can't seem to wrap my head around
multi-select list boxes.

I have a form based on tblStudentData.  I want to have subForms open up in
ListBox form to select values for student interventions the child/parent
field would be PeimsIDNum.  These interventions are stored in a seperate
table, tblInterventions.

tblInterventions has 2 fields, ModID (auto#) and Modification (text 50 chars)

I guess I can't see how the table would relate to the main tblStudentData.  
I have used subforms before except that I just used continuous forms and the
"Modification" control field changed to a combo-box from another table that
stored the actual modifications.  1 Record for each modification.

I try to learn something new with each project, so how do I use the
Multi-Select option in this case?  I can't seem to understand how the
multi-select works.  Anyone care to explain?  I would appreciate the effort.
Signature

Thanks As Always
Rip

Roger Carlson - 16 May 2007 14:16 GMT
If a examples will do, on my website (www.rogersaccesslibrary.com), is are a
few sample databases called "MultiSelect.mdb", "MultiSelectListboxes.mdb"
and "CreateQueries2.mdb" which illustrate how to use multi-select listboxes
in various circumstances.

Signature

--Roger Carlson
 MS Access MVP
 Access Database Samples: www.rogersaccesslibrary.com
 Want answers to your Access questions in your Email?
 Free subscription:
 http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L

>I read and read the newsgroups, but I can't seem to wrap my head around
> multi-select list boxes.
[quoted text clipped - 18 lines]
> multi-select works.  Anyone care to explain?  I would appreciate the
> effort.
Sprinks - 16 May 2007 14:28 GMT
Ripper,

There are two issues:

1.  You need another table to store the child records associated with each
student, called say, tblStudentInterventions:

StudentInterventionID   AutoNumber (PK)
StudentDataID              Number (Foreign Key to tblStudentData)
ModID                          Number (Foreign Key to tblInterventions)

tblInterventions stores all of the possible values of interventions, serving
as a "lookup" table for your list box.

2. A listbox, like any other control, can only have a single value.  If it
is bound to a field, a selection will be stored in the underlying field only
if MultiSelect is set to None.  To use a listbox to store multiple values,
you must use VBA code to insert records into your detail table.  The
following link shows you how to do this, however, I normally find it more
straightforward to use a continuous form with a combo box for this purpose.

http://www.fontstuff.com/access/acctut11.htm

Hope that helps.
Sprinks

> I read and read the newsgroups, but I can't seem to wrap my head around
> multi-select list boxes.
[quoted text clipped - 14 lines]
> Multi-Select option in this case?  I can't seem to understand how the
> multi-select works.  Anyone care to explain?  I would appreciate the effort.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.