473,654 Members | 3,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple selections in a ComboBox

18 New Member
Hi there!

Is it possible to make multiple selections in a ComboBox ?
i.e. make n consecutive selections and store them in an array
or make n selections in the open list of the CB by using (for example) the click-Shift Key keystroke

Purpose is to allow the user to select multiple different issues of a magazine with a maximum ease of use...
(Code I use is attached below)

Many thanks for your help!

Best regards,
Gerry

Expand|Select|Wrap|Line Numbers
  1. //import mx.controls.ComboBox; // imported in Parameters --> first frame
  2. //----------------
  3. CBBUY.addItem("Choose your issues...", "");
  4. var myMainIssues = new LoadVars();
  5. myMainIssues.onLoad = function() {
  6.     issues_array = this.myissues.split(";");
  7.     issuesdata_array = this.myissuesdata.split(",");
  8.     for (i = 0; i < issues_array.length; i++) {
  9.         CBBUY.addItem(issues_array[i], issuesdata_array[i]);
  10.     }
  11. };
  12. myMainIssues.load("Issues/issues.txt");
  13. var CBBUYListener:Object = new Object();
  14. CBBUYListener.change = function(evt:Object) {
  15.     // This will ouput the label of the selected item
  16.     var mainissues = new LoadVars();
  17.     mainissues = evt.target.selectedItem.label;
  18.     if (mainissues != "") {
  19.     // HERE I NEED TO PUSH EACH SELECTION TO A NEW ARRAY 
  20.     // FOR STORING A LIST OF THE LABELS OF THE SELECTED ISSUES
  21.     // (LIST WHICH I CAN DISPLAY LATER IN ORDER SUMMARY
  22.     // AND USE AS A RECAP IN THE BILL)
  23.         trace(mainissues); // ??
  24.     }
  25.     // This will ouput the data of the selected item                               
  26.     var mainissuesData = new LoadVars();
  27.     mainissuesData = evt.target.selectedItem.data;
  28.     if (mainissuesData != "") {
  29.         // HERE I NEED TO PUSH EACH SELECTION TO A NEW ARRAY 
  30.         // FOR STORING THE DATA OF THE SELECTED ISSUES
  31.         // (LIST WHICH I CAN USE LATER FOR COMPUTING THE AMOUNT
  32.         // OF THE PURCHASE)
  33.         trace(mainissuesData); // ??
  34.     }
  35. };
  36. CBBUY.addEventListener("change", CBBUYListener);
Mar 12 '08 #1
0 3162

Sign in to post your reply or Sign up for a free account.

Similar topics

4
17622
by: Therese A. Sorna | last post by:
Hello all... I am using Access 2002, and am trying to find a way for a user to be able to select multiple entries from a drop-down list. I am hoping that given a list as such: a b c d
1
2774
by: Mark | last post by:
My Category and Product tables look like: TblCategory CategoryID Category TblProduct ProductID CategoryID Product
1
3073
by: jeffgeorge | last post by:
Trying to create multiple acct reports based on the selection in a list box. I've set the list box for multiple selections, and in the report data source, I have a SQL statement which is reading the list box(when there is a single selection) but no luck with multiple selections. I'm suspecting I need to write a bit of code using an array. Does anyone have any insight or direction on how I might add?
2
2098
by: Craig B. | last post by:
I am relativly new to access 2000 and am having some trouble with a report. I am not sure what I want to do is something I can do in access. I want to be able to choose from a combo box multiple selections in a form and from those selections present them in a report. For example select a selection A,B, and C out of 9 possible choices. Then show them seperated by a comma in a field in the report. I also want the option of only selecting...
0
2041
by: bill yeager | last post by:
Duray, it helps in regards to knowing how to get the items that were selected in the lisbox, but I'm going in reverse --- after I get the items from the db that were selected, I'd like to be able to highlight them in the listbox within the datagrid control......... Thanks, Bill... >-----Original Message-----
4
2862
by: tbayse | last post by:
Hello, I have a question about making multiple selection queries in Access. I am running windows XP and Access 2003. Up until this point I had a form where a user would make single selections from a combo box and the following combo box would filter based on the initial selection. I now would like to give the opportunity to make multiple selections and the following combo box would filter based on that. How do I go about declaring this...
4
1442
by: kimiraikkonen | last post by:
Hi, I have a odd but a known question about listbox. I know listbox control can provide multi-select, multi-extendend selections. But i wonder if this selection type belongs to them or it has another tecnique. As you may know, in softwares like Windows Media Player or Winamp playlist has a listbox and it can be selected in 2 types. First type refers to player's own selection and second selection type can be done by user to look for...
4
3499
by: jvan2008 | last post by:
"Form1" combobox "cboModel" Row Source SELECT ., . FROM tblModel ORDER BY ; combobox "cboContactName" SELECT . FROM Query1 ORDER BY ;
6
7560
by: phpnewbie26 | last post by:
My current form has one multiple select drop down menu as well as few other drop down menus that are single select. Originally I had it so that the multiple select menu was first, but this created the problem that when I went to select the other drop down menus, the selections i made on the multiple select one would clear. Then I had tried putting the multiple select menu last so that the selections wouldn't clear but then after clicking the...
0
8814
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8475
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8591
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7304
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6160
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5621
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2709
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1915
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.