Hey so I'm having some problems with vb.net 2008. I need to create a search form where a combobox populates with names then the user clicks a name and the textboxes in the form are filled with the correct data for example txt_Firstname txt_last txt__nameage would all be filled with the right data from access.
I already have the combobox sorted meaning i can successfully see First names in the combo box so now all i need is helping with clicking a name in the combo box and the dataset being populated in the text boxes
heres the code used to populate the combo box:
Private Sub Search_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load dbprovider = "PROVIDER = microsoft.jet.OLEDB.4.0;" dbsource = (" Data Source = C:\Users\SEUN\Desktop\Addressbook.mdb") con.ConnectionString = dbprovider & dbsource Dim cmd As New OleDb.OleDbCommand("SELECT FirstName FROM tblContacts", con) con.Open() Dim sdr As OleDb.OleDbDataReader = cmd.ExecuteReader While sdr.Read() ComboBox1.Items.Add(sdr.Item("FirstName").ToString) End While con.Close() End Sub
Thanks in advance