Results 1 to 3 of 3

Thread: Combobox that display data from ITS OWN TABLE

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2008
    Posts
    23

    Combobox that display data from ITS OWN TABLE

    Hi,

    I am working on a project.

    I am using combobox on my project which I drag from a field in the sql table. I am using a sales order table for this.

    I want user to be able to click the salesorderid combobox and the data display is from salesorderid field. When user choose one salesorderid it will display all the information of this salesorder in other control that i have drag into the same form. How do I do it?

    Please help.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Combobox that display data from ITS OWN TABLE

    When you dragged your field it should have created a BindingSource, to which the ComboBox is bound. You can add other controls, like TextBoxes, and bind them to the same BindingSource. I'm not sure whether dragging another column from the same table would create a new BindingSource or use the existing one but if you bind the control manually it will work for sure. You would create the binding from the Data section of the Properties window.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2008
    Posts
    23

    Re: Combobox that display data from ITS OWN TABLE

    I have combobox which bind to other table. It acts as users multiple selection. Work perfectly.

    However to bind it back to its own table it still run but the data provided is data.view.grid instead of the data in the table itself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width