ActionScript 2.0 :: Populate Combo Box Values Using Another Combo Box Instance


I have two combo boxes. The first combo box's data is added through an XMLConnector object, the second combo box, I would like to populate through an on (change) event in the first combo box. The items in the second combo box would relate to the selection made in the first combo box. I have attempted the following within the Actions for the first combo box: on(change) { switch(this.value) { case "value1": comboBox2.addItem({Label:"Label",Data:"Data"}); break; } // end switch } // end event which is not working. should an event be dispatched by comboBox1 and a listener be attached to comboBox2? I can't find any examples of this on the internet.. but i might be using the wrong search terms.

View Answers
Very similar questions



Repeat Values Displayed In Populated Combo Box www.vbcity.com

I have a combo box, that on gotfocus, is populated with values (numbers) from a database table. But these values(numbers) are repeated over and over in the list of the combo box. For instance, on one occasion of gotfocus the combo box displays 6219, 6219, 6219, 6234, 6435, 6435. I only need it to show each number in the table once on the combo box. How can this be done?

Urgent:Loading Values From Database Based On Selection www.codeguru.com

Hi,I am developing a Web based application using ASP,VBScript etc.My problem is:I have two combo boxes in my form.Based on the selection inone combo,I have to populate the values in other combo box.I am accessing thedatabase Via.COM object.When the first combo box's Change event occurs,I haveto submit the form to the server and Based on the Value in the first combo,I have to load the Values in the second combo.Can anyone please help me with Code ?Thanx in Advance !Love,Sam

Auto Populate 2nd Combobox Based On 1st Combobox Data www.mrexcel.com

I need to populate two combo boxes from excel sheet, the data will be like below: Column A Column B A 1 A 2 A 3 A 4 A 5 B 100 B 101 B 102 So from the above data, one combo box should hold unique values A & B. On selecting a value from the 1st combo box A or B, respective values should be populated in 2nd combo box. So the data should be like below: If A is selected in the 1st combo box, then 2nd combo box should only show the values 1,2,3,4 & 5. If B is selected in the 1st combo box, then 2nd combo box should only show the values 100,101 & 102. Friends I need it in a macro and one important point is, this is dynamic and it is not static and the data can be more.

Sheridan Data Combo Box www.xtremevbtalk.com

HiI usually use a Sheridan Data Combo Box that has a datafieldlist property where you enter the field that will populate the combo box. I no longer have the facility to use Sheridan Data Combo, so I am using a normal combo box, but it does not have this property, can you please tell me where this is as it is populating the combo box with only the first record of the dataset. I have also tried a while loop with add items to the combo box, but this is also not working either.Thanks in advanceLouisa

Populating ComboBox That Is Connected To Another Combobox www.daniweb.com

Populating the combo box with the list of items from the one of the column in table from database.Based on the selection of item in the combo box, the another combobox should be populated with value corresponding to the selected item in the first combo box.[code]The problem with this code only the first row that is populate in the 2nd combo box.

Filtering Combo Box Based On Another Combo Box www.vbcity.com

Hi allI am trying to filter the contents of one combo box based on another combo box. I have one combo box called 'Manufacturer' which is populated by an ADO data control using the following SQL statement: SELECT DISTINCT Manufacturer FROM VehicleModels ORDER BY Manufacturer. I am then trying to get the second combo box to only show the models related to the manufacturer displayed in the first, to do this I am using another ADO data control with the following SQL statement: SELECT Model from VehicleModels WHERE Manufacturer ='" & strManufacturer & "'. I' using a string variable to hold the .Text value of the first combo box here. The values of the combo boxes are populated using VB at runtime rather than setting their properties at design time. This approach gives me no errors but when the model combo box is clicked, the list is empty.Am I approaching this the wrong way?Any help very gratefully recievedSimon

Help With Combo Boxes Please!! www.xtremevbtalk.com

Hi All,I have a program that works with a camera SDK. Part of the load form process calls to populate a combo box. It creates an index using enumerate the possible settings then populate the combo box. The default value in the combo box is always the top value (alphabetically). What I need to know is how do I make the default setting something else like the third or fourth value.thanks

How To Get Listindex... www.vbforums.com

SOmeone answered this a while back and I cannot find the thread...But basically I have a combo box that uses say the following dataGMFordDCXThose are the values shown....however I have a check box where I assign the actual text to the combo boxes but the .ListIndex property always gets set to -1 .. no matter what I set it to...for instance I may have a recordset which I pull back to set a value in the combo box:Me.cboBox.Text = objRS("SomeField").ValueIt sets the text in the combo box but listindex is still -1.How can I ensure the listindex gets set properly ?Thanks

Actionscript 3 :: Set The Text Field To Selected Value? stackoverflow.com

I have a combo box and I am using the 'selectedIndex' property to give it a default value (a value that is at the first(0) index). Setting this property in my ActionScript does select the value in the dropdown but it does not add the selected value to the combo box's text area. How do you do this? I make has no affect on the text area. Here is a sample of my code. The combo box list is populated fine. And the value is selected IN THE LIST. However, once you select a value in the list the combo box's list closes and nothing resides in the combo box's text field. comboBoxData.insert(0, {data:1, label:"Show me something specific"}); for (i in animations) { comboBoxData.push({data: i.uri ,label: "somevalue"}); [Code].....

Using Javascript To Populate A Number Of Text Boxes Based On The Data Item Selected In The 1st Combo... www.phpfreaks.com

I am using javascript to populate a number of text boxes based on the data item selected in the 1st combo box. I am now working on making the selection of that combo box populate another combo box with items from another table. I can hard the sql code for the 2nd combo box so that when I select an option it populates more text boxes, but want the contents of the 2nd combo box to dynamically change depending on the selection of the 1st box. I would like this to do it without refreshing the page after each 1st combo box selection.any help would be massively appreciated as I been stuck on this for a while. The 2nd box does not populate with the below code as I guess the variable isn't populated, I can put '1' in and it selects products with that prodid, but as explained above i'd like it to read the prodid from the 1st combo box. <?php require�"session_logincheck.php"; function�selectProductAndPopulate() [code]...


Populating A Combo Box From Another Combo Box? www.phpbuilder.com

I am using javascript to populate a number of text boxes based on the data item selected in the 1st combo box. I am now working on making the selection of that combo box populate another combo box with items from another table. I can hard the sql code for the 2nd combo box so that when I select an option it populates more text boxes, but want the contents of the 2nd combo box to dynamically change depending on the selection of the 1st box. I would like this to do it without refreshing the page after each 1st combo box selection.any help would be massively appreciated as I been stuck on this for a while. The 2nd box does not populate with the below code as I guess the variable isn't populated, I can put '1' in and it selects products with that prodid, but as explained above i'd like it to read the prodid from the 1st combo box. Code: <?php require "session_logincheck.php"; function selectProductAndPopulate() [code]...

OpenDialog www.vbforums.com

I need help on populating a combo box with values similar to what one finds in the Look in combo of a OpenDialog?Note: I dont wish to use the OpenDialogControl

Populating A Combo Box From Another Combo Box? www.webdeveloper.com

I am using javascript to populate a number of text boxes based on the data item selected in the 1st combo box. I am now working on making the selection of that combo box populate another combo box with items from another table. I can hard the sql code for the 2nd combo box so that when I select an option it populates more text boxes, but want the contents of the 2nd combo box to dynamically change depending on the selection of the 1st box. I would like this to do it without refreshing the page after each 1st combo box selection. The 2nd box does not populate with the below code as I guess the variable isn't populated, I can put '1' in and it selects products with that prodid, but as explained above i'd like it to read the prodid from the 1st combo box. Code:<?php require "session_logincheck.php"; function selectProductAndPopulate() { [Code].....

Populate ComboBox With Sheet Names www.ozgrid.com

I am having trouble with populating a combo box on a user form. I wish for the combo box to be populated using the names of the sheets of the workbook. I am using sheet1 as the control sheet where a user form will open up from this sheet, this will allow me to select the sheet that I require from a combo box that is placed on the form however I do not seam to be able to code the VBA to populate the combo box with the sheet names.

Populating Combo Box Options www.vbforums.com

from a webpage which has a combo box populated with options -- i want to populate combo box on form with same options.anybody please help

Update Combo Box Source On A Condition www.mrexcel.com

My userform has a combo box that upon entry event is populated via a sub procedure. The sub procedure defines a column of data on the active spreadsheet as a range and manipulates the range to add unique values only in alphabetical order into a collection. Which the collection is then used to Add.Items to the combo box. The userform allows selection of an existing value from the combo box OR type a new value In (no formatting on value). When combo box is exited and a further command button is pressed the value from the combo box is added to the spreadsheet. However, I don't need to refresh the source values of the combo box upon EVERY entry as I currently do, ONLY when a NEW value has been typed in and added to the spreadsheet. How can I (possible check index value ?) ensure when the user types in a new value, exits field and presses the command button is the ONLY time when the combo box source values need to be refreshed.

VS 02/03 Comparing Strings That Contain Quotes? www.vbforums.com

I'm trying to compare the selected item in a combo box to the items in a collection in search of a match. There is guaranteed to be a match because the combo box was originally populated from the same collection. This is the code I'm using: [Code].... This code works for other collections but not for this one. In this case, the loop stops after the first iteration, regardless of what's selected in the combo box. I have confirmed that the collection contains the correct data and that there is a match for the combo box options. The only difference between this instance and other instances is that the values in the collection and in the combo box contain a double quote at the end. I suspect this is what's causing the error. (To be clear, there is no error message, it's simply not returning the correct value.) I've tried various string compare methods but none of them have fixed the problem.

Dynamic Drop Downs In VB 2008? stackoverflow.com

I have an application which is using a set of three combo boxes. I have managed to populate each drop down depending on the selected value of the previous one The only problem is that, since the data is coming the database two selected values from the first combo box may have two different number of items in the database. so the second combobox should be populated with such data each time the selectedIndex_changed nethod of the first combobox is invoked if for example, the first combo box's first item has 10 corresponding items in the second combo box and a first combo box's second item has three corresponding items in the second combo box, selecting the second item after selecting the first item will lead to second combobox showing the three items and seven empty entries trailing after the three. What I want is to have the second combobox loaded with three items exactly when the second item in the first combo box has three items in the database here is an example Private Sub cboAccountGroup_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboAccountGroup.SelectedIndexChanged If mblnAccountGroupFirstLoad = True Then Exit Sub [Code]......

How To Manually Populate A DataComboBox [VB6] www.vbforums.com

Given a Data Combo Box [Dcb] I need to find a way to populate it manually with 3 fields (Type, Category, Location).If this was an ordinary Combo Box I would do something like “ComboBox.Additem “Type”, 0” however that option does not seems available with Data Combo Boxes.You may ask why am I using a Data Combo Box, it seems to be the only combo box that the Dcb_Change() event is loaded by selecting one of the items from the dropdown. The regular Combo box does not, it waits for the user to actually Type something in the field (which should be disabled because he should only have to choose from the list)

Populating The Text Box�s That Relate To The Chosen Combo Box�s With The Sum Of A Cal forums.aspfree.com

Hi, I'm in the process of building a program in access 2003 for estimating roofs, I've ran into a little problem, as described below. any suggestions would be very useful Populating the text box�s that relate to the chosen combo box�s with the sum of a calculation. In other words if X combo box is chosen (There are many combo boxes to choose from) populate xx text box with the sum of a calculation. Refer to the print screen example of my program: http://www.roofmart.net/Rest.asp Notice under the label felts the 15lb 36� felt combo box is chosen and it displays the value of 11 and next to the combo box is a text box that displays the value of 25 The calculation will be (11*25) = 275 this value of 275 must be added to the text box values that are being shown in the forms header under 30yr where it reads $4,606.80 and 40 yr $6002.80 only, this is because the 30yr comp and the 40 yr comp combo boxes are the only chosen roof types under the label roof types above the felt label. Hopefully this makes sense. Thanks -- Any help with be greatly appreciated.

Combobox VBA To Change Data In Cell? www.mrexcel.com

I am looking for a way to use VBA code to allow a combo box (form control) to change the data in a cell. For example: The combo box could contain Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. If the user selects Monday in the combo box, than cell A1 will populate the word Monday. In the particular situation that I using this for, an if statement will not work since there are 82 values (options) in the combo box.

Default Value For Combo Box - Version: 2003 (11.0) www.utteraccess.com

Is there a way to set the default value for a combo box to be the last value selected from the combo box? For instance, if the user goes to the form and choses "Apple" from the combo box. When the user closes the form and comes back to it at a later time, the default value for the combo box is "Apple"? Your help is much appreciated.

How To Select An Item In COMBO BOX Programatically? www.access-programmers.co.uk

hi All.. I could set the Combobox.Value to one of the values in the combo box and combo box displays that value. But when I try to use Combobox.Value subsequently it does not have any value. I noticed that the value property is populated only when the combox box item is manually selected(highlighted). How can I highlight the selection in a combo box? Thanks in advance

Access - Isolating Form Controls In Continuous Forms www.xtremevbtalk.com

OK, been working with proper instantiation and .net for too long, too rusty with this old Access.I have a form, set to Continuous Forms view. It lists a bunch of people.Each one of those form instances has an UNBOUND combo box it.When a form instance loads, a dynamic query is used to populate the combo box.My problem is that when I select something from the combo box, ALL the combo box instances across ALL the form instances chnge to the selection.Also tried with codeif I did me!cboBox1.text = "hi", then they would ALL change to hi.I hoped that "ME" would identify a specific form instance.Is there anyway, (properties, wixzards, or vbcode) to reference either the combos or the forms independantly??--Using Access 2003

Please Help Combobox www.xtremevbtalk.com

hi,if i have a combo box with a choise of THREE, FIVE, EIGHT OR TWELVE, is there any code that if say THREE is selected, when the second combo box is used it will display a range of values specific to THREE, if FIVE is used the second box displays a range of values specific to FIVE, etcthe combo boxes are on a vba user form, is there an example of the code that will populate combo box 1 from a range on a seperate sheet, then depending on combo 1 selection, populate combo box 2 with a range 1,2,3,or 4. I have been searching for ages for an example i can modify but to no avail.this dosent workPrivate Sub ComboBox2_Change()If ComboBox1.TEXT = "3" ThenComboBox2.RowSource = "SHEET1!1"ElseIf ComboBox1.TEXT = "5" ThenComboBox2.RowSource = "SHEET1!2"ElseIf ComboBox1.TEXT = "8" ThenComboBox2.RowSource = "SHEET1!3"ElseIf ComboBox1.TEXT = "12" ThenComboBox2.RowSource = "SHEET1!4"End IfEnd Sub

Automatic Population Of Combo And Text Boxes www.vbcity.com

HiI have created an input form(inpform) in access using VBA and I need to automatically populate other boxes on the form (from a separate table) when the contents of one box is entered. The documendet table contains the following fields:-FilenameSystemMenuDocnameDocdescWhen the filename is selected from the filename combo box on the input form (inpform) this should automatically populate the system combo box with the system used, the Menu combo box with menu the document is on, the document name text box with name of the document and the document description text box with details of what the letter is for. All this information is held in the documendet table.E.gWhen filename "BIRTHDAY" is selected from the filename combo box on the input form this should automatically populate the system combo box with "WORD", the Menu combo box with "LETTERS", the document name text box with "HAPPY BIRTHDAY LETTER" and the document description text box with "A LETTER TO WISH THE CUSTOMER HAPPY BIRTHDAY".Being new to VBA I'm not even sure where to start with this so any help would be greatly appreciated.ThanksJulesEdited by - julesl on 10/6/2003 12:58:26 AM

List To Change Based On Answer In Another ComboBox www.excelforum.com

I have 2 Combo boxes and I would like to do the following: If Combo Box 1 = Answer A then populate Combo Box 2 with dynamic list "List A" If Combo Box 1 = Answer B then populate Combo Box 2 with dynamic list "List B"

Using Variable To Name Combobox? www.excelforum.com

How do I use a variable to name the combo box? I'm using ComboBox1 through ComboBox15. In order to populate my combo boxes I always use the same code: [Code] ...... I know how to change RangeName easily enough, but how do I change ComboBox# to be the value of the combo box I'm populating? I want to run the sub routine instead of putting the code in every time. It really adds up especially with other statements.

Multiple Combo Controls And Autofill www.access-programmers.co.uk

Hi I have three cascading combo controls. What I am looking to do, is that when the value of combo one is chosen, the second combo box is requeried. What happens at the moment, is that when the second combo value is choosen the third combo is requeried and depending on that value a text box it autopopulated. Ideally what I want to happen is that when the second combo value is chosen, the values which at the moment appear in the third combo box will autopopulate 2 text boxes. There will only ever be 2 values in this box. I hope that I have explained this properly. So rather than using autopopulate to fill text boxes using the columns of a combo box, I want to do this using two rows in a cascading combo box. Hope this makes sense

Opulate A Field On Lost Focus Of Another Text Box www.vbforums.com

HiThe code below does the following thing, if a textbox has any value then automatically populate the value “Field” from a combo box in the same formI have written the code below, it does populate the field but only when the user set focus on the combo box, how can it be populated without the user clicking on the combo boxVB Code:Private Sub cmbMarket_LostFocus()    Dim conSQL As ADODB.Connection    Dim rsrecord As ADODB.Recordset     Dim strSQL As String           Set conSQL = db_getConnection           Set rsrecord = New ADODB.Recordset           strSQL = " SELECT Status From dbo.Status_Lookup " & _                        " Where Status = 'Field'"        conSQL.Execute (strSQL)            rsrecord.Open strSQL, conSQL     If Len(Me.cmbMarket.Text) > 1 Then        Me.cmbStatus = rsrecord!Status    End IfEnd Sub

Subfrom/unbound Combobox www.codeguru.com

In the sub form(datasheet view), the Vendor column is an unbound combo box and the Category and Product columns are bound combo boxes. When a Vendor is selected from the unbound column,the related Category combo box should get populated(working), and when a Category is selected, the related Product combo box should get populated(working). Error:However, when one vendor,e.g. "John" is selected for any record, the vendor field in all the records gets populated with "John".(When there are more than one records)How to solve this problemThanks

Excel - Combobox To Pivot Reporting Filter Through VBA www.mrexcel.com

I have linked Combo Box to Pivot Reporting Filter through VBA. When I Select Combo Box Value, same will be filtered in Pivot table. Combo Box values are constant where as Pivot report filter may not contain all the values which are in Combo Box. If Combo Box value is not available in Reporting filter of Pivot it should throw up msgbox and should select first value of Combo box.

Help With Filtering www.access-programmers.co.uk

I want to filter the information displayed on a form using the values I select in text or combo boxes. I want to filter the form using one or more of the following options. Call Ref - text box Location No - Combo box Area - combo box Status - combo box The combo boxes are taking their values from other tables within the database. Can anyone help me develop the code needed to filter the form. Thanks

One Combo Box Fills Another And Hits The Second Combo Box's Lost Focus Event? social.msdn.microsoft.com

Combo box 2 is filled based on a selection made in combo box 1 and a listview is populated based on the selection made in combo box 2.When the LostFocus event completes in combo box 1, it hits the LostFocus event in Combo Box 2 but it shouldn't. How do I prevent this from happening or if I can't prevent it, how do I work around it? The following is the code used. Private Sub cboCategory_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboCategory.LostFocus [code].....

Combobox Listindex www.vbforums.com

How do i set the listindex to the first or current item in the combo after populating it?I populate the combo box at form load.Thanx

ActionScript 2.0 :: Show One Of Values In A Combo Box? www.kirupa.com

Whats the right actionscript to show one of the values in a combo box? Basically i have values that are inputed from a selection in the combo box being stored into a database. But I then need to read the values back and show the right one out of the combo box choices selected.

Populate ComboBox Without Duplicate Entries www.vbforums.com

Hello,I'm populating my combo box (which is on a form) from an Excel data Worksheet. There are duplicate entries in the main row. I need to list it in the combo box only once. How would I do this?example: column A hasappleappleappleboxboxcardogdogI only need the combo box to list: apple, box, car, dogThen based on their selection, I need to populate another combo box with sub listings:example: column A & B hasapple Grannyapple Grannyapple MacIntoshbox bluebox graycar Lexusdog Boxerdog Boxerso if user selected apple, next combobox needs to contain: Granny and MacIntosh.Thank you for any help.CJ

More Duplicates In ComboBoxes www.xtremevbtalk.com

Hello,I'm populating my combo box from an Excel data Worksheet. There are duplicate entries in the main row. I need to list it in the combo box only once. How would I do this?example: column A hasappleappleappleboxboxcardogdogI only need the combo box to list: apple,box,car,dogThen based on their selection, I need to populate another combo box with sub listings:example: column A & B hasapple Grannyapple Grannyapple MacIntoshbox bluebox graycar Lexusdog Boxerdog Boxerso if user selected apple, next combobox needs to contain: Granny and MacIntosh.Thank you for any help.LA

Professional :: Disabled Combo Boxes Don't Display Properly After Loading Movie forums.adobe.com

I have a main movie that contains some combo boxes. Some of them may be disabled.By pressing a button I load another movie using loadMovie. The loaded movie also contains combo boxes.When the button is pressed, the clip that shows the combo boxes is removed from the stage and the loaded movie is displayed. By pressing another button, the loaded movie is unloaded and the clip with the combo boxes is displayed again.Well, once the other movie has been loaded, when I go back to the clip with combo boxes, the disabled combo boxes have a small gray button covering the black down arrow.I have determined that so long as the loaded movie contains combo box in the library, the problem occurrs, even if there is no actual instance of it.The combo boxes that are not disabled are not affected. The combo boxes are disabled by setting "cb_name.enabled=false".If the combo box is enabled, it displays correctly, but if disabled again, it goes wrong again.My project is targeting Flash 8, so it uses AS2.I'm using Flash CS4.

Database Programming In Visual Basic forums.devshed.com

hello ,i am developing a database application using MS access and Visual Basic 6.0.In one of the forms,I have to link 2 combo boxes.The data in one of the combo boxes depends on the data in the other combo box.ex. if i choose one value in one combo box then all the corresponding values related to that value should be displayed in the other combo box.can anybody send me a code for this problem.thank u

Combo BOX And 2 Text BOX Help Me Plz www.vbcity.com

If am using one Combo Box with 2 Text BoxCombo Box Values 1-    Select Type2-    Yes3-    NoWant to do 1- if combo box value “YES “ then Text1 enable = True2- if combo box value “NO” then Text2 enable = True3- if combo box value “ Select Type” then both Text box enable = False**** Remember when ONE TEXT box Enable True Other Must be Enable False ****

Reading Items From File And ComboBoxes social.msdn.microsoft.com

I'm program that uses quite a few different comboboxes. Essentially drop down boxes to prevent invalid user input. Anyways, the problem I've run into is when I'm loading files that will populate those combo boxes. Essentially, certain selection in the combo boxes invalidate selections in other boxes. What I'm doing is taking a text file, and reading it line by line. Each line is based off the combo box selections previously made and saved using the same application. Returning to the same screen, I want to populate the combo boxes with the data previously selected. I'm initially populating the combo boxes in program with <combo box>.Items.Add() Other than searching item by item for the proper text, getting the index of of that text, and then setting that as the selected item? So what I'm thinking of doing is this... Dim Fin As System.IO.StreamReader Fin = System.IO.OpenText(FileName) Dim sInput As String Dim iIndex As Integer [Code] .....

Additem For Combo And Listbox www.codeguru.com

Hi, I have many combo/list boxes on a form whose selected values will be associated to one record in one of the SQL table. These combo boxes are them selves populated by a table each, which have id and name of the entry. When I populate the combo I can just populate the text(name) of the entry..and hence when the final record is to be saved I have text(name) of all the combo boxes, but I want to store the corresponding id(from the combo table for each selected entry).My question is how do i associate that id from the table to the entry in the combo/list box(Index in additem does not help)I know I can do a join of two table while inserting to get the id....but I dont want to do it as there are lots of combo/list boxes on the formThanks,Vij

Combo Box www.xtremevbtalk.com

I have a form that's connected to a database and on which there's a combo box. The combo box is populated by a field in the DB, therefore its list size is variable. Now the thing is, I need this combo box to show a particular value from the list associated with the current record. But here's the part I'm having problems with: The combo box cannot be edited... the user must be able to only select an entry from the combo box's list, not type on himself. I'm using combo box style 0 - Dropdown Combo for this, but it gives me headaches when I try to load a value into the box's text property, since it's readonly.Can anyone help me with this?

VB Word Populating Combo Box forums.devshed.com

Hello, first time poster: I am using Visual Basic through word XP and I cannot figure out how to populate combo boxes. The word help files only refer me to populating combo boxes on the word forms not VB forms made in word. I used VB 6.0 in college (a few years ago) and populated my combo boxes in Sub Form Load() and I cannot find the Sub Form Load () in VB word.Thank you,

Populating Two Combo Boxes forums.devshed.com

I have one combo box (Category) which is populated by a MySQL table using php. I am trying to use the onchange javascript to submit the value selected so that I can populate the other combo box (sub-category) based on what was previously choosen. So can anybody give me a clue on how to submit the first boxes value so that the second can see what was selected (javascript function).

Adding Records To Database Using A Data Combo Box www.xtremevbtalk.com

I've created a VB application that connects to a MS Access 97 database using ADO. This application has the basic features (add, delete, update, view records).When adding a record, I have used a form with data combo boxes that are each connected to an ADO. There are about 40 fields on this form.The user fills out the add form with the appropriate data from the combo boxes and clicks the add command button which will add the record to the Access database.In order to populate the combo boxes, I have created ADO for each combo box so that I can populate it with only the data that I need. For example, for the fiscal year combo box, I have created a ADO that gets the fiscal year from the Fiscal Year table. Is there a way that I can populate the combo boxes with the appropriate data without creating an ADO for each box.Any suggestion would be welcome.

Repopulating A ComboBox From Database Table www.dreamincode.net

trying to figure out out to make a combo box re-populate itself with values from its data bindings from an Access database. I have my bindings in the combo box, and it pulls the right column from my table, and returns the proper value to a different table. Everything saves properly to all of the tables, but what i am trying to accomplish here is this... I have a combo box, it is populated with a database column of "G/L codes" (by the way that is not the column name) the combo box shows these values without problem. These codes exist in a table that is editable (basically so the user can add a G/L code to the list if one is missing), a button is supplied that opens a new form, which contains DB related text boxes, and a data binding navigator to look through the data base records, save, add new records, etc. When this form is loaded, the user can add a new record, save the info, and then close this form, which brings us back to the main form where the combo box is located that is populated with the values of this G/L code table, what I am trying to get working is updating this combo box now that a new G/L code has been added. I have been looking for a solution for days, tried many forums, read all posts on this site that had a keyword of "combo box" and I can still find nothing. I have tried many code samples such as... Private Sub Repopulate() Me.G_L_Code___DescriptionComboBox.DataSource = Me.Db1DataSet.GLCodes Me.G_L_Code___DescriptionComboBox.DisplayMember = "Combined" Me.G_L_Code___DescriptionComboBox.ValueMember = "Combined" Me.G_L_Code___DescriptionComboBox.Refresh() End Sub have tried calling this when the combo box gets focus in the attempt to update the combo box every time it is selected. Have tried reloading the table adapter as well when the combo box takes focus with the following Private Sub G_L_Code___DescriptionComboBox_TakeFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles G_L_Code___DescriptionComboBox.GotFocus'TODO: This line of code loads data into the 'Db1DataSet.GLCodes' table. You can move, or remove it, as needed. Me.GLCodesTableAdapter.Fill(Me.Db1DataSet.GLCodes) End Sub Honestly I'm at wits end trying to get this combo box to repopulate its values from the database. I don't get any error codes when running either, all my attempts simply do nothing

Flex :: Switching Between Data Providers ? stackoverflow.com

Suppose I have one combo box and I am switching its data provider from oldDataProvider to newDataProvider with ActionScript. Both data providers are ArrayCollections. Then, when a change occurs in the oldDataProvider ArrayCollection, it affects the combo box, although it is not its data provider anymore. Specifically, when removing an item from oldDataProvider (in the range of the newDataProvider values), it decreases the selectedIndex value of the combo box by one, changing the selected item.

Object Null Combo - Error When Try To Populate Some Combo Boxes With A Value social.msdn.microsoft.com

I am getting an error when i try to populate some combo boxes with a value, the combo box has values in and the right amount the code is getting the right number. the error msg is "Object reference not set to an instance of an object."

Displaying Values To A Combo Box www.vbforums.com

on the form load, i populated the combo box with values from a recordset...i added the ID's to the combo box itemdata..heres the values...ID NAME1 CPU2 KEYBOARD3 MONITOR 4 MOUSE5 TELEPHONEmy problem here now is, how can i display the value of that combo box with this query?"select * from tblHardware where ID = 5"i taught i got this problem with this code...Code:cboEquipment.ListIndex = IIf(IsNull(!Name) = True, -1, cboEquipment.ItemData(!wareID))on this thread started by me also.. http://www.vbforums.com/showthread.php?t=508185really need help here guys!

Populating Combo Boxes bytes.com

I have to write a web page wht three combo boxes, all three are to be populated from a database. - there tables = Bulidings, Floors and Offices The user will choose a 'Building' from the first combo, once it has been selected, I need to populate the second combo box with the 'floors' of that selected building. The user will then select the floor, which in turn will then populate the office combo box for the user to select.

Combo Box Should Trigger Another Combo Box www.excelforum.com

I have to create two combo boxes and when a user selects a value from one combo box, the values should get changed in the other combo box. For example : if one combo box has values like "c/c++ programming" "java programming" and so on.. ... i would like to display the authors recommended (corresponding to combo box1) in the combo box 2.

Populating Combo Boxes www.vbforums.com

I need to populate a drop down list box (combo) with two columns: One would be the visible value that a user selects from the dropdown list. The other value is the key field of the underlying database table which would be hidden from the user. This is an unbound combo box...the key field is being used to filter a query based on the user's selection.I tried using the typical combo box population code: Do Until rst.EOF With cboMyCombo .AddItem rst!Widget .ItemData(.NewIndex) = rst!WidgetID End With LoopHowever, I get an overflow error for the WidgetID field if it exceeds the integer limitation of 32000. And more frustratingly, how on earth do I accomplish this kind of combo box set up when the key field for the underlying table is a string (e.g. SSN)?This is a slam dunk with MS Access combo boxes and I can't believe I'm having this much difficulty using straight VB. Do I have to resort to loading the MS Access library and use the Access combo box?Any insight would be greatly appreciated. Thank you.Regards,Rick

Combo Box On A Tab Control SelectedIndexChanged Event Doesn't Fire Until Tab Is Selected? social.msdn.microsoft.com

I am using VS2008, vb.net, Windows forms project.I have a combo box control on a tab control.The selected value of the combo box is bound to a binding source.The data source of the binding source is a typed dataset.I set the datasource of the binding source when a record is chosen in a data grid control.Since the combo box is bound to the binding source, this should set the selected value of the combo box, and fire the initial SelectedIndexChanged event.Therefore, I remove the SelectedIndexChanged event handler for the combo box before I set the datasource of the binding source, and add the handler again after the datasource is set.

OnChange Combo Box Populate Anoter Combo Box www.daniweb.com

First I have a combo box populated from mysql db. Then onChange of the first combo box then I would like to populate my second combo box. I am trying out the jquery method as below. The first combo box id is $clientID. The problem I dont get the alert method shown that means is not working.

VB6/VBA - Populate Combo Box In Powerpoint Presentation www.xtremevbtalk.com

Hello everyone,I have a powerpoint presentation. On one of my slides, I would like to add a combo box. I would like to populate the combox box with some values.Question1:Where and how do I put in the vb or vba code in designing this presentation?Question2:How do I go about populating this combo box with my values?Note: I want this combox box to be operational when I run the presentation.This is a new gig for me, so a clear explanation will be much appreciated.Thanks.tgif

AJAX :: Microsoft JScript Runtime Error: Sys.WebForms.PageRequestManagerServerErrorException: '<combo... forums.asp.net

We have used Ajax toolkit combo box in one of our application. We have used two Ajax toolkit combo box in an aspx page. Both combo boxes are populated while loading the page. Combo box 1 has list of items and based on combo 1 selection, combo box 2 is populated. This requirement is implemented within the updatepanel and only partial page rendering is done on combo box 1 selection. This is working fine when the list of items are populated at the time of page load. We have provided an option to add new item in combo box 1 and combo box 2. When new item is added in combo box 1, it calls iteminserted event. Since it is a new item, it does not have corresponding items in combo box 2. When we add new item in combo box 2 it submits the page (partial rendering). While it gets submitted it throws following JScript error. "Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: '<combo box id>' has a SelectedIndex which is invalid because it does not exist in the list of items. Parameter name: value" We are unable to resolve this issue.

How To Prevent Combo Box Event visualbasic.ittoolbox.com

Hi All, I have two combo boxes. Bases up on the first combo box selecteditem, second combo box items should be populated. And i have writtensome code in the first combo box clicl event. when i am setting thefirst combo box list index = -1 or clearing then corrosponding clickevent also firing. how to prevent this?thanks & regards,Sridhar CS

Combo Box And Tooltips www.vbforums.com

Hi All,I have created a combo box and added a list of sotfware titles.When I click on the drop down button the titles are populated in the combo boxes list view. Some of these titles are longer then the combo box.What I was wondering is if there is a way to check the titles in the drop down list of the combo box (as the mouse moves over). and if the text is too long (in the drop down portion of the combo box) have it displayed in the tooltip?Thanks.

Combo Box Query? www.access-programmers.co.uk

Hi all, I intend to populate a combo box with the value from the table. Therefore, under the combo box Row Source I write: SELECT distinct Tasks.Task FROM Tasks ORDER BY Tasks.Task; However, I also want to populate the combo box with additional value that is not found in the table n I dont intend to save this value in the table. I.E whenever the form is load this combo box contains Car //from table Truck //from table Bus //from table Others //hardcode. Is it possible to combine value from query + hardcode. The combo box in access does not have a addItem method. Therefore, is it possible??? Thank you

Get Combo Box Values Into String Array www.access-programmers.co.uk

I'm populating a combo box from a query. I'm running a DCount on 2 criteria. The user selects the criteria from 2 combo boxes. If the user types * into the combo box, I want to be able to loop through each combination from the combo box values. I need to get the list of values from the combo box and put it into a string array, however it throws a type mismatch if I did something like BRANCHES(x)=CStr(cboBranches(x)) 'cboBranches(x)=cboBranches.Value(x) So I tried to run the sql from vb but found out that I can't return a string value from that (vb sucks). So I'm back to trying to get the values from the combo box. Any help would be appreciated.

Get The Instance Name Into One Combo And The Databases On That Instance Into The Other Combo? social.msdn.microsoft.com

I have two combo boxes and I am currently using MicroSoft SQL Server to get the instance name into one combo and the databases on that instance into the other combo. I am wanting to switch to System.Data to get these values and I am able to get the instance through enumeration but am having trouble finding where to get the database name values assigned to that instance.Does anyone know the equivalent of SMO Server.databasename is in System.Data?

Combo Box To Re-populate Based On User Input www.xtremevbtalk.com

I have a combo box named Combo1 and a text box named txtFilter. Whenever user enters a string in txtFilter, my code will look for that string within each string (entries) in the Combo box. Then the combo box will re-populate to display only strings that contained the sub-string that the user entered. Here are my codes but the combo box does not re-populate. Am I using the wrong event (txtFilter_Changed()) or something? I would like the combo box to re-populate automatically after user typed something in the text box. Thanks. p/s: I did not include the "re-populate code" yet as I need to make the code below work first. Quote:Private Sub txtFilter_Changed() With Combo1 For i = 0 To .ListCount - 1 If InStr(.List(i), txtFilter.Text) <> 0 Then Print "substring is found within string" Else Print "substring not found within s" End If Next i End WithEnd Sub

Making Combo Boxes Depend On Each Other www.xtremevbtalk.com

I have two combo boxes, 1 is populated with a list from made in notepad and the other is currently blank, until i select an item from combo box 1 then depending on which item i have selected the list in combo box 2 will become populated with a note pad list. So the list in combo box 2 is going to be different if the item selected in combo box 1 is changed. I have the code for populating a combo box with a list made in notepad but i am having some trouble gettting the 'dependant' combo boxes working.Sorry if this sounds a little confusing and thanks for ANY help.

DataCombo Box www.vbforums.com

Hi all,I am new to Data Combo box. Could any me tell me how can i populate Data Combo box from a disconnected recordset? I allow user to change to change the value or add value in the Data Combo box. How can i update those changes back to the disconnected recordset?Thanks!

Simple Combo Problem www.vbforums.com

If I have added a ID in a combo box and a string to show the data...How do I assign the ID back to the combo box to show the string?For instance:1 Customer12 Customer23 Customer3Now I load this form and I have the ID 2...How do I set the combo box to this value so it shows Customer2.I tried Combo.ListIndex = 2No luck...

Populate Combo Box forums.aspfree.com

User types in search string hits search button in a form, if there are any records that match the search string a list/combo (which one should i use by the way?) box is displayed and populated with all the matching records. the user then selects which of the records to display using the now visible list/combo box I need to be able to access partial match records ie: search string = mi returns: michael mike amie etc The code i have so far makes the text box visible (i'm using a text box because i don't know how to populate a list/combo box) and populates the new box with whatever the user types in the search box . It's the select statement and populating the list/combo box in my vba script that i need help with. here is the code that i have so far that updates the new box to the search string:

Excel 2010 :: How To Auto Populate Data Based On ComboBox Selection www.excelforum.com

I have a question on how I could populate data using a combo box selection in Excel 2010. For example, I have a table with values in Sheet 1, & below that table there is a combo box whereby another table of values can be populated based on the selection of the combo box. Maybe to make it clearer... Table 1 Name | Address | Phone number Andy | Avenue 2 | 999 John | Road 5 | 998 Combo box (selection of names): John Data derived from combo box - Table 2 Name | Address | Phone number John | Road 5 | 998 how I could solve this Also, do let me know if this can be done without the use of VBA.

Run Search Suggest And Populate? www.daniweb.com

I am using the following to auto search db Dim connString As String = My.Settings.strConn Dim conn As New SqlConnection(connString) [code]..... I want the text boxes to populate when a result is clicked from the drop list of the combo box at the moment you start typing in the combo box and it starts to populate with first names then you pick one of the names from the list which is displayed in the drop down box you then have to click the box to get it to populate the text boxes.

Populate Combo Box From A Recorset www.codeguru.com

I want to populate a Combo Box from a recordset (I want to list every values of a column).Thanks ! :-)

Populate Input Field Using HTML Combo-Box www.daniweb.com

Any way to allow a user to click items in a combo box and have its value populate an input field.

Update ComboBox www.mrexcel.com

I used to have a Text box on the form that allowed the user to enter a value for the Weight variable. But they wanted it changed to a drop down combo box so I have changed the form and added the combo Box with the following Private Sub CmbBx_Weight_Change() CmbBx_Weight.Value = UCase(CmbBx_Weight.Value) End Sub What the user wants now is to have the combo box where they can enter a variable for the first time through and this value gets added to the combo box list. (The combo box starts out empty). And each time after that when the user comes to this combo box, the first value will be there already and they will be able to use that value or enter a new one and each time save this new one to the combo box. I have been looking at the board for an example, but can't figure it out.

Elseif Statement Find Next Empty Row www.ozgrid.com

I have created a user form with a combo box and three text boxes. The drop down box is populated via the initialization of the form; code is posted below. the "add item" names are names that are already on the worksheet in column 1. What i have done is used the command button "submit" to populate the information from the textboxes to the worksheet. what i would ike to do is populate the empty cells below this area with the information that is in all three text boxes and the combo box. for the IF / elseif statments i have used the combo box as the condition. So the quandry is I cant input the information into the empty cells, i have tried a few things, my vba is very basic, as you can tell ihavent even DIM'd anything (i think that is another thread though :D ) here is the initialize code and below is the "submit button" code. Private Sub UserForm_Initialize() 'sets values for text boxes cbomaterialdiscription.Value = ""..........

Multiple Values For An Item In A Combo Box www.xtremevbtalk.com

Hey Guys,Is there any way to have a multiple value for an item in a combo box, i.e: like in HTML when you have a form item <select name="combo"> <option name="item1" value="1">Item1</option></select>The display name is Item1 but the value of this item is actually 1, can this be done in vb?I'm populating a combo box from a database and I want the string to appear for the item in the list but I want it's id to actually be the value.sorry for the HTML code, but it's an easy way to explain the problem.thanks!

Combo Boxes www.xtremevbtalk.com

Hi I'm using a combo box to limit a users input choice to fields in a database, i've managed to populate the combo box with field names using combo1.add (rsPRODUCT_GTOUP!Name) but when the user selects a option from the combo list I want to obtain information, Ideally I would like to attatch an ID to each item in the combo box, as well as a name ! any ideas ? ThanksMatt

Combo Boxes www.xtremevbtalk.com

Hi I'm using a combo box to limit a users input choice to fields in a database, i've managed to populate the combo box with field names using combo1.add (rsPRODUCT_GROUP!Name) but when the user selects a option from the combo list I want to obtain information, Ideally I would like to attatch an ID to each item in the combo box, as well as a name ! any ideas ? ThanksMatt

Using A Combo Box To Bring Up A Corisponding Field From A Record Set www.codeguru.com

As the title suggests i am trying to use a combobox to populate some text boxes with information from a recordset. I currently have the combo box being populated (with all the records ie names) as well as the text boxes (name, address, phone number etc) being populated (with the first record from the table) but when i choose a different name from the combo box the text boxes dont update, how do i get them to update??I am using a ADOBC connection to a MS Access database.Any help greatly appreciatedBrendon

Button To Jump To Index Location In Combo Box. www.access-programmers.co.uk

I've been using a combo box to jump to a specific record in a form. But, even with the comb box set at 15 lines long, with many hundreds of records in the form the vertical slider on the combo box is a little small and can be jumpy (moving 1/32" jumps 10 names, etc.). The combo box is formed from: SELECT [cust num], [last name], [first name] FROM [this table] ORDER BY [last name], [first name]; I'd like to put in some boxes that will jump the combo box to a certain set of names. For instance, put in a box with a label on it that says "M". Pressing this button would jump the combo box to the first [last name] that starts with the letter M. For instance, if I have records for: Lupold Macaroni Martin Then it would jump to Macaroni. But, if Macaroni is deleted, then Martin would be the first name that begins with M and pressing the "M" box should jump the combo box to Martin.

Populating Textbox Based On Selection. www.codeguru.com

I have a combo box and a text box on my form. Based on what the user selects from the combo box I want to populate the text box. Basically I've hit the DB and have selected 4 fields and populated the CB with the a name. What I want to do when the user selects this name is take the corresponding info associated with this selection and populate the text box.1.e.g. SQL=......2.Returns=ID1,ID1_NAME,ID2,ID2_NAME3.I populate the CB with ID1_NAME and the ID1 values using an array.4.NOW user selects a name from the combo box.5.I want to take selection and populate the text box with the information that was retrieved with my SQL statement with ID2 and ID2_NAME that is matched with ID1 on the click event without having to requery the DB.Any thoughts or suggestions?Thanks in advance!

Help Wanted..... www.xtremevbtalk.com

hii have a combo box ,a list box and add button.when the user selects something from the combo box and clicksadd some values related to the combo box get populated in the list box in one line not as a list.Private Sub cmdAddRecord_Click() sSql = "select default_value,record_type_code from rta_record r " sSql = sSql & " record_type_code='" & cboRecord.Text & "'" gDb.OpenRecordset rsField, sSql sSql = "" Do While Not rsField.EOF sSql = sSql & rsField!default_value rsField.MoveNext Loop lstFile.AddItem sSql Set rsField = Nothingend subi want that when the user clicks on any line in the list box,it should show its parent value in the combo box.so cborecord.text should be the value thru which the list was populated.i know its lil complicatedbut i'm sure someone will be able to helpthanxaarti

ActionScript 3.0 :: Use Xml In Combo Boxes Via Unescape To Send Parameters? forums.adobe.com

I am trying to populate a component combo box using an urlloaded xml, the xml has been "escaped" and the spaces replaced with +. � How do I populate the combo box as when I unescape the xml and replace the +s it is now in string format. � When I have the combo box in need to be able to select an option, which reflects in the next urlrequest...e.g. ����� TextLoader.load(new URLRequest(" http://onedev/one/Query2.asp?Cat=THEvalueFROMmyCOMBOBOX ")); [Code].....

Run Macro Based On Value www.ozgrid.com

I am trying to write a procedure that takes the value of one combo box ( a string) and based on that value compare a range of values to populate a cell with a tax bracket. So if the value is say "Single" it will then go look and see if income is between 0 and 7825 or 7825 and 31850 etc to populate a cell on the worksheet with the appropriate tax bracket. I then need to do the same if the combo box value is married, filing jointly, etc.

TreeView Control Help www.vbcity.com

i have a combo box and a TreeView Control in a windows application.How to populate the drives in the combo box and folders in a TreeView Control.the problem is:i want to populate all the drives of the system in the combo box.And when i select a drive, it should display all the folders in the TreeView control corresponding to that selected drive.I tried Using .getlogicalDrives,but invain.Is there any coding for this.Please help me.thanks in advance,tirumal. 

VS 02 / 03 Populating Combo Boxes www.vbforums.com

I am using the following code for populating the combo boxes in my application. It is really nice. If any one requires, may use this. It takes three parameters. The first, the name of the Combo Box and the second, the SQL Statement to populate the combo box and the third is the number of column to be displayed (from the SQL statement) [Code]...

Searching Multiple Fields With Multiple Lists www.xtremevbtalk.com

hi all:i have a lot of combo boxes full of values and each combobox represents a field on a table, i wish to get all the rows that correspond with any value from the combo box for the field.for examplecombo1 has 5 values and the field that corresponds with combo 1 is field 1combo2 has 6 values.....and each combo can have any number of valuesi want to know all the rows that their values match each field based on the combo valuesi thougth of this...select * from table where field1 in (all of combo1 values)the real problem is how to get all the combo 1 values in the parethensis becausse all combos have different number of values thanks

Constraining Combo Box Values Based On The Value Selected In Another Combo Box www.access-programmers.co.uk

Thanks in advance for your help. I would like to set up rules/constraints such that the value selected in combo box A determines the available values in combo box B. For example, "Combo box A" is bound to the [PartnerType] field and "Combo box B" is bound to the [PartnerRole] field. Let's say that the two choices in Combo Box A are "LLC", "LP", and "Corporation". There are 5 possible choices in Combo Box B: "X", "Y", "Z", "Q", and "U". If a user selects "LP" in Combo Box A, I would like Combo Box B to only show choices "X" and "Y". And if a user selects "LLC", only choices "Y", "Z", "Q", and "U". Similarly, I would like to set this up so that Combo Box B is not initially visible--it becomes visible when a user selects "LLC" or "LP". If a user selected "Corporation", Combo Box B would remain hidden.

Combo Box Controlled Query 2 www.access-programmers.co.uk

sorry for the repeating of a previous thread but i have looked at all of the replys on the first combo box controlled query and have followed what was reccomended but i still have some problems. :( i have three combo boxes and i want to query a single table with the selected combo options. atm i am using the criteria part of a query to filter the results by the combo box [forms]![Form1]![cboStaff] this works well for one thing but when i want two i have put them in line which means AND so both combo boxes have to have a value in and then the query looks for combo box ones value with combobox 2's value. is there any way i can make the value in the second combo box mean any result. which would effectivly turn the query into a search for just the first criteria set by the combo box??? please help i have been going round in circles trying to figure out how i am going to do this :confused:

Combo Box Event To Select Certain Data From An Access Database? social.msdn.microsoft.com

I am using VB 2008 Express to connect to an Access 2007 database. I have a combo box that is populated by the database. When I used the Access report VBA, I used the AfterUpdate() event to calculate a sum and place the results in a text box. I need to know how to do the same operation in VB 2008 Express using the SelectedIndexChanged event of the combo box. The combo box is called "cboYearMonth" and is populated by my database, this is working correctly. The text box that I want the calculated results to appear in is called "ExactPagesTextbox" I have a query in Access called "JobTypeExact_Query" that contains all the pages that I need. What I need to do is calculate the total number of "Pages" limited to the YEARMONTH selected in the combo box. YEARMONTH is a value in every record in this query.

VS 2008 Combo Box Remember User Input www.vbforums.com

i have a combo box without a list of item now i want to do is when a user input a number or text in combo box the text value of the combo box will be saved and when the user input the same number the combo box will not save the same text value. and when the user logout and login back again i want to load the list of item that he or she inputted earlier in the combo box.

Autofill From Combo To Text Box Questions www.access-programmers.co.uk

Hi all I use a form that has a combo box and a text box.The combo box values are Email,Cna,Dna.I manage to make users to select values from combo box and show it in the text box.I want to ask if it is possible when user select "Cna" and "Dna" from the combo box the same will appear to text box but the text box will be locked.If you choose email it would be enable. Thanks