A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Storing Multiple selections in list boxes



 
 
Thread Tools Display Modes
  #1  
Old November 30th, 2006, 02:59 PM posted to microsoft.public.access.gettingstarted
Klatuu
external usenet poster
 
Posts: 7,074
Default Storing Multiple selections in list boxes

A multi select list box behave a little differently from other controls in
that it does not, on its own, return a value, regardless of whether anything
is selected or not. You have to use the list box's ItemsSelected collection.
It will contain a list of all the selected items. VBA Help has a good
example of how to retrieve data from a multi select list box.

With that being said; however, there is a basic flaw in your system. One
item cannot be two types. It is like saying "That animal over there is a cat
and a dog." Sorry, it is a cat or a dog. You can have animals that are cats
and animals that are dogs. So to say an item can be multiple types means
that you can have a magazine that is an item. Once copy of the magazine may
be hard copy and another copy may be electronic. Therefore, each copy is a
different type.

That means you need two records in your table, one for the hard copy and one
for the electronic copy. Each will have a field in the record identifying
its type. Now we get down to the fact that perhaps a multi select list box
is not appropriate because you should only select one type for a record.


"fordrules01" wrote:

I am trying to set up a very basic catelogue system of reference material and
i'm having problems with the filing system.

I have a main form "Item" and in it have a Listbox for the type of item (ie.
magazine, book, cd, electronic, etc.) and want to be able to select multiple
types as some of the references are both electronic and hard copies. At
present the list box looks up the value from a related table "ItemType" but
will not store the selections in the original record.

I have basically no understanding of code writing so i've struggled with
some of the other responses to similar questions on this board. I gather it
cannot simply store from the way i have attempted above but need a real
lamens explination of how i can get around this.

Any help greatly appreciated.

Matt

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.