Binding menu with combobox

dem

Member
Joined
Dec 10, 2008
Messages
7
Programming Experience
Beginner
uSING VB 2005
I have use the binding menu and when i load the form the first customer fields appear. I dont want this i want to select from combo box (example Customer.ID 3 ) and the details of this customer to see only.

RapidShare: Easy Filehosting is my form


i want to have a combobox and the combobox to found the name of the customer Example John.C When i choice this name to load the personal information in the textbox i have in the form ... Remember is linked with microsoft db


can u help tell me with code pls?
and the code (that i have up to NOW
VB.NET:
Expand Collapse Copy
Public Class Form1



    Private Sub CustomersBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CustomersBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.CustomersBindingSource.EndEdit()
        Me.CustomersTableAdapter.Update(Me.Db1DataSet.Cust omers)

    End Sub

    'Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'TODO: This line of code loads data into the 'Db1DataSet.Customers' table. You can move, or remove it, as needed.
    'Me.CustomersTableAdapter.Fill(Me.Db1DataSet.Custo mers)



    Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        CustomerIDTextBox.Text = ""
        CNameTextBox.Text = ""
        CSurnameTextBox.Text = ""
        HomeTelTextBox.Text = ""
        MobileTelTextBox.Text = ""
        CountryTextBox.Text = ""
        CityTextBox.Text = ""
        BonusCardTextBox.Text = ""
        AndressTextBox1.Text = ""
        Postal_codeTextBox1.Text = ""
        EmailTextBox1.Text = ""
        FaxNumTextBox1.Text = ""
        NotesTextBox.Text = ""
    End Sub

    Private Sub BonusCardTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BonusCardTextBox.TextChanged

    End Sub

    Private Sub AndressTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AndressTextBox1.TextChanged

    End Sub


    Private Sub BtnEXIT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnEXIT.Click

        If MsgBox("Are You Sure You Want to Exit", MsgBoxStyle.YesNo, "Nicolaou Department Store") = MsgBoxResult.Yes Then
            End
        Else
            MsgBox("Welcome Back", MsgBoxStyle.OkOnly, "Nicolaou Department Store")
        End If
    End Sub

    Private Sub BindingNavigatorAddNewItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem.Click

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


        If Me.Validate Then
            Me.CustomersBindingSource.EndEdit()
            Me.CustomersTableAdapter.Update(Me.Db1DataSet.Cust omers)
        Else
            System.Windows.Forms.MessageBox.Show(Me, "Validation _errors occurred.", _
            "Save", System.Windows.Forms.MessageBoxButtons.OK, _
            System.Windows.Forms.MessageBoxIcon.Warning)
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles MyBase.Load

        ' TODO: This line of code loads data into the
        ' NorthwndDataSet.Customers table. You can move,
        ' or remove it, as needed.
        Me.CustomersTableAdapter.Fill(Me.Db1DataSet.Custom ers)
    End Sub
End Class
thnks for help
 
thnks for the help i would like also to have the buttons for Add New delete update next previous move first move last buttons in a binding navigator
... if i make these buttons can work both with the default of the binding navigators that allready have or must disable it

thnks for help
 
Back
Top