Linking multiple combo boxes

Hello,
I need some help with something that I am having trouble wrapping my head around. I am in the midst of creating some forms for our office that were originally MS Word files that have since been converted to PDF's. On these forms (which are now compiled into one PDF) there is a field for a name and one fore a licence number. What I would like to do (if possible) is have a drop down combo box with the pilots name. Once the name has been selected, it automatically populates the pilots name and licence number on the subsequent forms.
Is this possible and if so, does someone have a tutorial on how to do this? I have not had much luck looking online but thought perhaps someone on here may have tired something similar before.
Thanks.
Chris

Yes it's possible. For some help, check out: http://www.acrobatusers.com/tutorials/2007/js_list_combo_livecycle/
There is a part 2 to this article that may help as well.
George

Similar Messages

  • How to link two combo boxes? (urgent)

    Hello,
    I am wondering how to link two combo boxes in Acrobat Pro 9. Basically, I need to link a building with a list of rooms. There are 3 building choices in my first combo box. For the sake of example, Building A, Building B and Building C. When one of the buildings is selected, I want a 2nd combo box to display the rooms that are located in that building. So by selecting building A, you would then be able to choose a room from the list of available rooms in the second drop box. The buildings cannot share a list of rooms because they have the same room numbers. Is anyone able to help?
    - Travis

    You can also use ajax. When the first combo box element is selected, it will call the ajax function and that ajax function will bring the data from the database and place it in second combo box.

  • Dealing with multiple combo boxes.

    Hi all,
    Yesterday I started a thread on the topic of using a main JComboBox, that when you select one of its items, 2 sub combo boxe's models are changed. Michael_Dunn helped me on this and gave me a great example. However, I don't want to have the 2nd combo box change the contents of the 3rd. I'd like the 1st combo box to control both the 2nd and the third. I modified his code a bit to make this true. However, when you select an item on the 1st box, and then change the item on either the 2nd or 3rd box, it sets the selection to both the 2nd and 3rd box. I'd like these boxes to behave normally, without one changing the other, except for the 1st boxe's control. This sounds a bit confusing the way I explain it, so just check out the code and you'll see what I mean. Also, here's the link to my previous thread: http://forum.java.sun.com/thread.jspa?threadID=702577 Any help would be greatly appreciated! Thanks!
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class Testing extends JFrame
      String[] cbo1Text = {"Snacks","Drinks","Cigarettes"};
      String[][] cbo2Text = {{"Chocolate Bar","Chips","Candy"},{"Soft","Beer","Wine","Spirits"},
                           {"Menthol","Camel","Marlboro","Lite"}};
      String[][][] cbo3Text = {{{"Choc1","Choc2","Choc3"},{"Chips1","Chips2","Chips3"},{"Candy1","Candy2","Candy3"}},
                          {{"Coca Cola","Pepsi","Dr Pepper","Solo"},{"Bud","Coors","Heinekken"},
                           {"Champagne","Chardonnay","Shiraz"},{"Bourbon","Scotch","Vodka"}},
                          {{"Menthol15","Menthol20","Menthol40"},{"Camel15","Camel20","Camel40"},
                           {"Marlboro15","Marlboro20","Marlboro40"},{"Lite15","Lite20","Lite40"}}};
      JComboBox cbo1 = new JComboBox(cbo1Text);
      JComboBox cbo2 = new JComboBox(cbo2Text[0]);
      JComboBox cbo3 = new JComboBox(cbo3Text[0][0]);
      public Testing()
        super("JComboBox Test");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setLocation(400,300);
        setSize(300,300);
        getContentPane().setLayout(new FlowLayout());
        cbo1.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            DefaultComboBoxModel cbo2NewModel = new DefaultComboBoxModel(cbo2Text[cbo1.getSelectedIndex()]);
            cbo2.setModel(cbo2NewModel);
            DefaultComboBoxModel cbo3NewModel = new DefaultComboBoxModel(cbo3Text[cbo1.getSelectedIndex()]/*[0]*/);
            cbo3.setModel(cbo3NewModel);}});
        /*cbo2.addActionListener(new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            DefaultComboBoxModel cbo3NewModel = new DefaultComboBoxModel(cbo3Text[cbo1.getSelectedIndex()][cbo2.getSelectedIndex()]);
            cbo3.setModel(cbo3NewModel);}});*/
        getContentPane().add(cbo1);
        getContentPane().add(cbo2);
        getContentPane().add(cbo3);
      public static void main(String[] args){new Testing().setVisible(true);}
    }

    this line
    cbo3.setModel(cbo3NewModel);}});
    which you changed to
    cbo3.setModel(cbo2NewModel);}});
    should be
    cbo3.setModel(new DefaultComboBoxModel(cbo2Text[cbo1.getSelectedIndex()]));}});

  • Re-linking multiple text boxes in InDesign

    So here's my problem....
    I've laid out a magazine in InDesign. It has many features, complete with graphics, insets, etc. One of my contributing authors wants his story (as published) sent to him separately in order to have it translated into Japanese. It's six pages long. I've copied & pasted it into a new 6 page InDesign document. But now the text box links are broken. I want to re-link the text boxes (already filled with text) back together, but I can't seem to figure out how to do that. I really DON'T want to have to reflow all the text and graphics again. Isn't there a simple way to just re-link the text Boxes?

    Instead of copy/pasting, you would have been better off going to
    Layout>Pages>Move Pages and moved them to a new document. Then the text
    threads would have stayed intact.

  • Multiple combo box

    Here is my senerio, I have two comboxs, one named C1 and one
    C2....... I want to populate two different dynamic text boxes named
    ct1 and ct2. When I select the pull down on one of the combo boxes
    it populates both ct1 and ct2???? See script, what am I doing
    wrong?? thanks for any help
    Function change(evt){
    qt1 = evt.target.selectedItem.label;
    qt2 = evt.target.selectedItem.label;
    Q1.addEventListener(“change”this”);
    Q2.addEventListener(“change”this”);

    Hi Madhu,
    For Combo Box behaviour you can check in the Templates in Xcelsius.You can find the path in Xcelsius as File ->Templates ->Category ->HR ->Compensation or  Personal Finance ->Personal Finance Dashboard under the Templates.
    You can find the Ingo's blogs regarding the Web Intelligence  Concepts     .
    Path is  ->  http://wiki.scn.sap.com/wiki/display/profile/Ingo+Hilgefort
    Regards,
    Venkat P.

  • Powershell Unique Selections for Multiple Combo Boxes

    I am currently working on a powershell script that will use 4 combo box controls. I would like for them to all use the same data source whether it be an array or just a .txt file. I would like for each selection to be unique so that no 2 combo boxes can
    have the same item selected. Is there a way to hide the item selected in the data source so the other combo boxes do not even have the option to select it and then when the user changes the item in one of the combo boxes the item is available again? 

    What I am looking do do is have a list of values (T1111,T1112,T1113,T1114) to be selected from by 4 combo boxes. Each value can only be selected once so if one combo box picks T1111 the other 3 do not have that option in its selection. So far I reload the
    combo boxes ever time a selection is made and remove the option from the array, but I was looking to see if there is a better way. As it currently stands, getting distinct values isn't working.
    Code snippet to remove item from array:
    function Get-DataSource
    $array = @("T1111", "T1112", "T1113", "T1114")
    $combo1 = $combobox1.SelectedItem.ToString()
    $combo2 = $combobox2.SelectedItem.ToString()
    $array = $array | Where-Object -FilterScript { $_ -ne $combo1 }
    $array = $array | Where-Object -FilterScript { $_ -ne $combo2 }
    return $array
    I apologize for not uploading my code.
    function OnApplicationLoad {
    #Note: This function is not called in Projects
    #Note: This function runs before the form is created
    #Note: To get the script directory in the Packager use: Split-Path $hostinvocation.MyCommand.path
    #Note: To get the console output in the Packager (Windows Mode) use: $ConsoleOutput (Type: System.Collections.ArrayList)
    #Important: Form controls cannot be accessed in this function
    #TODO: Add modules and custom code to validate the application load
    return $true #return true for success or false for failure
    function OnApplicationExit {
    #Note: This function is not called in Projects
    #Note: This function runs after the form is closed
    #TODO: Add custom code to clean up and unload modules when the application exits
    $script:ExitCode = 0 #Set the exit code for the Packager
    #endregion Application Functions;2
    # Generated Form Function
    function Call-tenet_psf {
    #region Import the Assemblies
    [void][reflection.assembly]::Load('mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
    [void][reflection.assembly]::Load('System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
    [void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
    [void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
    [void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
    [void][reflection.assembly]::Load('System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
    [void][reflection.assembly]::Load('System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
    [void][reflection.assembly]::Load('System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
    [void][reflection.assembly]::Load('System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
    #endregion Import Assemblies
    #region Generated Form Objects
    [System.Windows.Forms.Application]::EnableVisualStyles()
    $form1 = New-Object 'System.Windows.Forms.Form'
    $combobox2 = New-Object 'System.Windows.Forms.ComboBox'
    $combobox1 = New-Object 'System.Windows.Forms.ComboBox'
    $buttonOK = New-Object 'System.Windows.Forms.Button'
    $InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
    #endregion Generated Form Objects
    # User Generated Script
    function OnApplicationLoad {
    #Note: This function is not called in Projects
    #Note: This function runs before the form is created
    #Note: To get the script directory in the Packager use: Split-Path $hostinvocation.MyCommand.path
    #Note: To get the console output in the Packager (Windows Mode) use: $ConsoleOutput (Type: System.Collections.ArrayList)
    #Important: Form controls cannot be accessed in this function
    #TODO: Add modules and custom code to validate the application load
    return $true #return true for success or false for failure
    function OnApplicationExit {
    #Note: This function is not called in Projects
    #Note: This function runs after the form is closed
    #TODO: Add custom code to clean up and unload modules when the application exits
    $script:ExitCode = 0 #Set the exit code for the Packager
    $FormEvent_Load={
    #TODO: Initialize Form Controls here
    Load-ComboBox $combobox1 (Get-DataSource)
    Load-ComboBox $combobox2 (Get-DataSource)
    function Get-DataSource
    $array = @("T1111", "T1112", "T1113", "T1114")
    $combo1 = $combobox1.SelectedItem.ToString()
    $combo2 = $combobox2.SelectedItem.ToString()
    $array = $array | Where-Object -FilterScript { $_ -ne $combo1 }
    $array = $array | Where-Object -FilterScript { $_ -ne $combo2 }
    return $array
    #region Control Helper Functions
    function Load-ComboBox
    <#
    .SYNOPSIS
    This functions helps you load items into a ComboBox.
    .DESCRIPTION
    Use this function to dynamically load items into the ComboBox control.
    .PARAMETER  ComboBox
    The ComboBox control you want to add items to.
    .PARAMETER  Items
    The object or objects you wish to load into the ComboBox's Items collection.
    .PARAMETER  DisplayMember
    Indicates the property to display for the items in this control.
    .PARAMETER  Append
    Adds the item(s) to the ComboBox without clearing the Items collection.
    .EXAMPLE
    Load-ComboBox $combobox1 "Red", "White", "Blue"
    .EXAMPLE
    Load-ComboBox $combobox1 "Red" -Append
    Load-ComboBox $combobox1 "White" -Append
    Load-ComboBox $combobox1 "Blue" -Append
    .EXAMPLE
    Load-ComboBox $combobox1 (Get-Process) "ProcessName"
    #>
    Param (
    [ValidateNotNull()]
    [Parameter(Mandatory=$true)]
    [System.Windows.Forms.ComboBox]$ComboBox,
    [ValidateNotNull()]
    [Parameter(Mandatory=$true)]
    $Items,
       [Parameter(Mandatory=$false)]
    [string]$DisplayMember,
    [switch]$Append
    if(-not $Append)
    $ComboBox.Items.Clear()
    if($Items -is [Object[]])
    $ComboBox.Items.AddRange($Items)
    elseif ($Items -is [Array])
    $ComboBox.BeginUpdate()
    foreach($obj in $Items)
    $ComboBox.Items.Add($obj)
    $ComboBox.EndUpdate()
    else
    $ComboBox.Items.Add($Items)
    $ComboBox.DisplayMember = $DisplayMember
    $combobox1_SelectedIndexChanged={
    #TODO: Place custom script here
    Load-ComboBox $combobox2 -Items (Get-DataSource)
    $combobox2_SelectedIndexChanged={
    #TODO: Place custom script here
    Load-ComboBox $combobox1 -Items (Get-DataSource)
    # --End User Generated Script--
    #region Generated Events
    $Form_StateCorrection_Load=
    #Correct the initial state of the form to prevent the .Net maximized form issue
    $form1.WindowState = $InitialFormWindowState
    $Form_Cleanup_FormClosed=
    #Remove all event handlers from the controls
    try
    $combobox2.remove_SelectedIndexChanged($combobox2_SelectedIndexChanged)
    $combobox1.remove_SelectedIndexChanged($combobox1_SelectedIndexChanged)
    $form1.remove_Load($FormEvent_Load)
    $form1.remove_Load($Form_StateCorrection_Load)
    $form1.remove_FormClosed($Form_Cleanup_FormClosed)
    catch [Exception]
    #endregion Generated Events
    #region Generated Form Code
    $form1.SuspendLayout()
    # form1
    $form1.Controls.Add($combobox2)
    $form1.Controls.Add($combobox1)
    $form1.Controls.Add($buttonOK)
    $form1.AcceptButton = $buttonOK
    $form1.ClientSize = '614, 289'
    $form1.FormBorderStyle = 'FixedDialog'
    $form1.MaximizeBox = $False
    $form1.MinimizeBox = $False
    $form1.Name = "form1"
    $form1.StartPosition = 'CenterScreen'
    $form1.Text = "Form"
    $form1.add_Load($FormEvent_Load)
    # combobox2
    $combobox2.FormattingEnabled = $True
    $combobox2.Location = '123, 92'
    $combobox2.Name = "combobox2"
    $combobox2.Size = '121, 21'
    $combobox2.TabIndex = 2
    $combobox2.add_SelectedIndexChanged($combobox2_SelectedIndexChanged)
    # combobox1
    $combobox1.FormattingEnabled = $True
    $combobox1.Location = '123, 64'
    $combobox1.Name = "combobox1"
    $combobox1.Size = '121, 21'
    $combobox1.TabIndex = 1
    $combobox1.add_SelectedIndexChanged($combobox1_SelectedIndexChanged)
    # buttonOK
    $buttonOK.Anchor = 'Bottom, Right'
    $buttonOK.DialogResult = 'OK'
    $buttonOK.Location = '140, 254'
    $buttonOK.Name = "buttonOK"
    $buttonOK.Size = '75, 23'
    $buttonOK.TabIndex = 0
    $buttonOK.Text = "&OK"
    $buttonOK.UseVisualStyleBackColor = $True
    $form1.ResumeLayout()
    #endregion Generated Form Code
    #Save the initial state of the form
    $InitialFormWindowState = $form1.WindowState
    #Init the OnLoad event to correct the initial state of the form
    $form1.add_Load($Form_StateCorrection_Load)
    #Clean up the control events
    $form1.add_FormClosed($Form_Cleanup_FormClosed)
    #Show the Form
    return $form1.ShowDialog()
    } #End Function
    #Call OnApplicationLoad to initialize
    if((OnApplicationLoad) -eq $true)
    #Call the form
    Call-tenet_psf | Out-Null
    #Perform cleanup
    OnApplicationExit

  • Multiple combo boxes

    Hi all,
    New to this forum. Hoping someone might be able to help or
    point me in the right direction. I`m trying to use three combo
    boxes, with each combination of choices taking the user to a
    different frame. Is this possible? Any hints of where to start?
    Many thanks in advance!

    Thanks for your reply. I have now got as far as being able to
    tell which item has been selected from two combo boxes, but can`t
    seem to use them outside of this function. I tried declaring as
    global variables but still can`t get it to work.
    Heres my code:
    var myComboBox1:mx.controls.ComboBox;
    myComboBox1.removeAll();
    myComboBox1.addItem("--Choose--", "Choose");
    myComboBox1.addItem("one", "1");
    myComboBox1.addItem("ten", "10");
    myComboBox1.addItem("twenty", "20")
    myComboBox2.removeAll();
    myComboBox2.addItem("--Choose--", "Choose");
    myComboBox2.addItem("a", "a1");
    myComboBox2.addItem("b", "b10");
    myComboBox2.addItem("c", "c20")
    //Check taking the correct value from combo box 1
    myComboBox1.addEventListener("change", doChange1);
    function doChange1 (evt1){
    trace ("Combo box 1 " + evt1.target.value);
    _global.varResult_1=evt1.target.value
    //Check taking the correct value from combo box 2
    myComboBox2.addEventListener("change", doChange2);
    function doChange2 (evt2){
    trace ("Combo box 2 " + evt2.target.value);
    varResult_2=evt2.target.value
    //Try to choose which frame to go to depending on both combo
    boxes
    function checkResult(){
    //varResult_1=myComboBox1.value
    //varResult_2=myComboBox2.value
    if((_global.varResult_1==10)&(_global.varResult_2==b10)){
    gotoAndStop(10)
    function doChange(evt1) {
    trace("Value changed to 1" + _global.varResult_1);
    trace("Value changed to 2" + evt2.target.value);
    checkResult()
    Can anyone give me any hints of where I am going wrong or
    where to look for help?
    Thanks again

  • Multiple combo boxes cause application freeze

    I have an application that uses 3 combo boxes, they appear if
    the remoting service populates them.
    The actionscript is very simple, I only add items, removeall,
    and sort them by their label.
    If I use old MX combo box, my application works perfectly.
    If I use the Version 2 components, the application works when
    I select one of the combo boxes, but the second I touch the second
    combo box, it locks up the application and I get the message that a
    script is running, should I abort...
    I am using Flash 8 and want to stick with all V2 components,
    but...
    anybody experience this issue? I have a lot of other V2
    components on the application, all work, except this combobox
    issue.
    thanks
    Josh

    You can create a JavaScript array of the items and values to be set into the combo boxes and then use Acrobat's JavaScript's ''setItems()' method to load the fields.
    Get various fields (combo or list) and set items in the list using various techniques. 
    var l = this.getField("ListBox");
    l.setItems(["One", "Two", "Three"]);
    var c = this.getField("StateBox");
    c.setItems([["California", "CA"],["Massachusetts", "MA"],
    ["Arizona", "AZ"]]);
    var c = this.getField("NumberBox");
    c.setItems(["1", 2, 3, ["PI", Math.PI]]);

  • Cany you link a combo box to a submit form button?

    This question pertains to Adobe Acrobat 9 Standard.
    On my form, I have a combo box that lists 5 names and a button that I want to use to submit the form via email. 
    Based on the combo box selection, I want the submit button (when pressed) to submit the completed form directly to the email address that corresponds to the name selected.
    Is there a way to do this?
    Any help will be greatly appreciated!

    The Industry combo box contains the following keystroke script:
    // Custom Keystroke script for combo box
    (function () {
    if (!event.willCommit) {
    // Set up an array for arrays of industry corresponding to export values in this combo box
    var aIndustry = [];
    aIndustry[0] = ["--"]
    aIndustry[1] = ["Jen H"];
    aIndustry[2] = ["Al M"];
    aIndustry[3] = ["Steve T"];
    aIndustry[4] = ["Al M, Jen H, Steve T, Glen P"];
    aIndustry[5] = ["Al M"];
    aIndustry[6] = ["Al M"];
    aIndustry[7] = ["Steve T"];
    aIndustry[8] = ["Jen H"];
    aIndustry[9] = ["Glen P"];
    aIndustry[10] = ["Al M, Jen H, Steve T, Glen P"];
    aIndustry[11] = ["Steve T"];
    aIndustry[12] = ["Al M"];
    aIndustry[13] = ["Jen H"];
    aIndustry[14] = ["Jen H"];
    aIndustry[15] = ["Al M"];// Get the export value of the selected item
    var ex_val = event.changeEx;
    // Populate the combo box field with the industry
    getField("BD Executive").setItems(aIndustry[ex_val]);
    When one of the 15 industries are selected, the Executive field automatically populates with one of four names (or, in two instances, all four names).
    Let's say I choose Construction as my Industry.  The Executive field automatically has Jen H's name.
    When the form is complete and I click the Submit Button, I want it to submit the form by e-mail directly to Jen H.
    So do I have to enter a script somewhere within the Executive field or the Submit Button field?
    Please excuse my ignorance.  I'm very, very new to this.
    Thanks again for everything!!!

  • Linking combo boxes to a table

    I have made a set of combo boxes that allow the user to input a home and away football team and their scores. I have also setup a table with 4 teams in it. How can i link the combo boxes so that EG:
    If Arsenal 2 - 1 Chelsea is a result inputted how can i link it to a table so that Arsenal will go top with 3 points, 2 goal for, 1 against etc
    Basically i need to update the table from the info supplied by the combo boxes???

    we don't tolerate that attitude either....
    besides I gave u guidelines, check the other thread, but u can be sure that nobody will help you if u keep this attitude...
    READ the links I posted in that other thread, work on the issue then come back with questions and post your code so that we know how to help you based on your code..that's how it works here..

  • Help with linking combo boxes so that some options are made unavailable

    Hello!
    I'm having trouble setting up an interactive PDF form with multiple combo boxes.
    I have designed an interactive PDF form in InDesign CS6 but am doing the final preparation and formatting in Adobe Acrobat XI Pro.
    First of all, I am not sure if I should be using combo boxes or list boxes, but the combo box seemd to look better after I export the PDF and also left the field blank, ready for selection from the drop-down menu.
    Basically I have a list of drop-down lists, but not all combinations are compatible. For example, after maing "Selection 1" in "Combo box 1", I need only "Selection 1", "2", and "3" [out of the total 5] to be available in "Combo box 2".
    I need to be able to apply this algorhythm to the next few combo boxes as well.
    Moreover, I would need some of the checkboxes disabled [the user won't be able to check them at all]when I make a certain selection in some of the combo boxes.
    Needless to say, I don't know any Java, coding or making calculations in LiveCycle Designer, so I don't even know where to begin.
    I have attached a screen grab of my form and what I want to achieve.
    Any help would be very much appreciated.
    Thank you!

    If it is static data, I would suggest you to cache it rather than having it in each of the user session. You can have configuration/code to refresh when needed. Please look at any available caching frameworks (EhCache, OSCache etc...)

  • Fill up combo box

    Hello,
    Is there a way to fill up a combo box that is not by adding line by line with the collection of ValidValues? In VB.Net there is a property call DataBinding that allows to link the combo box with a DataTable, that makes the combo box load immediately.
    What I will like to have is the same combo box that shows when you look for a item inside of a invoice or quote.
    Thanks,
    Yaco

    Yaco
    I believe to achieve that you can ...
    1. Open your form using the Screen Painter and then set the combo box Alias property to the field where the ValidValues are.  Set its DataBound property to true and indicate the Table (same as above indicated in the DBDataSource).  If you can't use the Screen Painter then you will have to do it by code.
    2.  Add a DBDataSource on your form that points to the Invoice or Quote table, like this
      Dim oDS As SAPbouiCOM.DBDataSource
      oDS = oForm.DataSources.DBDataSources.Add(strTableName) 'add your table here, to find out look on the SAP SDK Help Center under Database Table Reference.
       This is done at Load time.
    The next time you run you should see the combo filled with the valid values from the field without you having to indicate them by code.  The field of course must have ValidValues declared.

  • Search Engine issues and how to get multiple answers in combo box

    I'm doing a project in vb6 i have a data where when i search it should give multiple answers in combo box.
    example i have a debtor code each debtor code as more than one addresses when i search in one debtor code how can i get multiple addresses in the combo box. my search engine command
    as follows 
    Private Sub Command2_Click()
    Adodc1.Recordset.MoveFirst
    Adodc1.Recordset.Find "DEBTOR_CODE = '" & Text11.Text & "'"
    If Adodc1.Recordset.EOF = True Or Adodc1.Recordset.BOF = True Then
    MsgBox "Record Not Found!", vbApplicationModal
    Adodc1.Recordset.MoveFirst
    Me.Combo1.SetFocus
    Me.Combo1.ListIndex = Me.Text11.Text
    End If
    End Sub
    when i search in my text filed i should answer to the debtor code i'm finding and multiple answer in the combo box for the same debtor code.
    Please help ;( 

    Hello,
    This forum is for VB.NET for VB6 please review the links at
    the following page.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Multiple lines in a combo box

    Hello,
        I am attempting to create a pdf file for the purposes of filling in information and then printing it out.  I have very limited skill with Acrobat 8, basically what I've learned myself, and I run into an issue with my combo boxes.  Some of the sentences I have put into the boxes are too long and I have not been able to figure out how to wrap the text, or make it use multiple lines.  I need all of my data to show.  Can someone explain, in simple terms if possible, how this can be accomplished, or provide an alternative.  I have read several posts but have not been able to work out where to start with them.  Any help would be appreciated.  Thanks!

    I've been reading through more forums and I think what you suggested was to have shorter options in the combo box that, when selected, generate the full length sentence into a text field.  Is that the basic concept?  Here is one of the sentences that is too large for my combo box:
    5b. Use Mendel's Law to evaluate monohybrid Punnett Squares for complete dominance, incomplete dominance, codominance, sex-linked, and multiple alleles. (DOK 2)
    So I could set up a combo box with 5b in this case.  I could then write script in the combo box properties that would cause the sentence to be generated into a text field located beside the combo box.  If this is the case I would have to write out script for each one of the number/letter combinations correct? 
    Just for some background info, I'm attempting to create a lesson plan template (I'm a teacher) that has all the necessary information listed so that I don't have to type it all out every time I do a lesson plan. 

  • How to Bind a Combo Box so that it retrieves and display content corresponding to the Id in a link table and populates itself with the data in the main table?

    I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
    1. Party (PartyId, Name)
    2. Case (CaseId, CaseNo)
    3. Petitioner (CaseId, PartyId) ............. Link Table
    I am completely new to .Net and to begin with I download Microsoft's sample application and
    following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
    with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
    And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
    users can choose one from the dropdown list to add or edit the petitioner.

    Hello Barry,
    Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
    the sample available at the link you supplied.
    To get the idea of the thing here is my code behind of a view vBoxPetitioner:
    <UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:v="clr-namespace:CCIS.View.Case"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    d:DesignWidth="300"
    d:DesignHeight="200">
    <UserControl.Resources>
    <DataTemplate DataType="{x:Type vm:vmPetitioner}">
    <v:vPetitioner Margin="0,2,0,0" />
    </DataTemplate>
    </UserControl.Resources>
    <Grid>
    <HeaderedContentControl>
    <HeaderedContentControl.Header>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
    <TextBlock Margin="2">
    <Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
    | <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
    </TextBlock>
    </StackPanel>
    </HeaderedContentControl.Header>
    <ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
    </HeaderedContentControl>
    </Grid>
    </UserControl>
    This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
    Here is the code of vmPetitioner, a ViewModel:
    Imports Microsoft.VisualBasic
    Imports System.Collections.ObjectModel
    Imports System
    Imports CCIS.Model.Party
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' ViewModel of an individual Email
    ''' </summary>
    Public Class vmPetitioner
    Inherits vmParty
    ''' <summary>
    ''' The Email object backing this ViewModel
    ''' </summary>
    Private petitioner As tblParty
    ''' <summary>
    ''' Initializes a new instance of the EmailViewModel class.
    ''' </summary>
    ''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
    Public Sub New(ByVal detail As tblParty)
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Me.petitioner = detail
    End Sub
    ''' <summary>
    ''' Gets the underlying Email this ViewModel is based on
    ''' </summary>
    Public Overrides ReadOnly Property Model() As tblParty
    Get
    Return Me.petitioner
    End Get
    End Property
    ''' <summary>
    ''' Gets or sets the actual email address
    ''' </summary>
    Public Property fldPartyId() As String
    Get
    Return Me.petitioner.fldPartyId
    End Get
    Set(ByVal value As String)
    Me.petitioner.fldPartyId = value
    Me.OnPropertyChanged("fldPartyId")
    End Set
    End Property
    End Class
    End Namespace
    And below is the ViewMode vmParty which vmPetitioner Inherits:
    Imports Microsoft.VisualBasic
    Imports System
    Imports System.Collections.Generic
    Imports CCIS.Model.Case
    Imports CCIS.Model.Party
    Imports CCIS.ViewModel.Helpers
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' Common functionality for ViewModels of an individual ContactDetail
    ''' </summary>
    Public MustInherit Class vmParty
    Inherits ViewModelBase
    ''' <summary>
    ''' Gets the underlying ContactDetail this ViewModel is based on
    ''' </summary>
    Public MustOverride ReadOnly Property Model() As tblParty
    '''' <summary>
    '''' Gets the underlying ContactDetail this ViewModel is based on
    '''' </summary>
    'Public MustOverride ReadOnly Property Model() As tblAdvocate
    ''' <summary>
    ''' Gets or sets the name of this department
    ''' </summary>
    Public Property fldName() As String
    Get
    Return Me.Model.fldName
    End Get
    Set(ByVal value As String)
    Me.Model.fldName = value
    Me.OnPropertyChanged("fldName")
    End Set
    End Property
    ''' <summary>
    ''' Constructs a view model to represent the supplied ContactDetail
    ''' </summary>
    ''' <param name="detail">The detail to build a ViewModel for</param>
    ''' <returns>The constructed ViewModel, null if one can't be built</returns>
    Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Dim e As tblParty = TryCast(detail, tblParty)
    If e IsNot Nothing Then
    Return New vmPetitioner(e)
    End If
    Return Nothing
    End Function
    End Class
    End Namespace
    And final the code behind of the view vPetitioner:
    <UserControl x:Class="CCIS.View.Case.vPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    Width="300">
    <UserControl.Resources>
    <ResourceDictionary Source=".\CompactFormStyles.xaml" />
    </UserControl.Resources>
    <Grid>
    <Border Style="{StaticResource DetailBorder}">
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <TextBlock Grid.Column="0" Text="Petitioner:" />
    <ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
    </Grid>
    </Border>
    </Grid>
    </UserControl>
    The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
    what I need to Know is how to route the binding path if it exists in a different ViewModel?
    Sir, I look forward to your early reply bringing a workable solution to the problem I face. 
    Warm Regards,
    Arun

Maybe you are looking for