Hi,
i have two database tables from Access, both tables have 20 columns and 40000 records with different data.
i need to create a textbox and a search botton, so when i input a person's name in the textbox i can search both tables' records. if i can find it in the first table then i don't have to search the second table but if i can't find it in the first table then i have to search the second table. when i find a person in the tables, i would like to have that person's info from those 20 columns display in 20 different textboxes on the form.
so i have connected to the database and checked to see if the name is in both tables but i can't get the result onto textboxes. how can i do that?
thank you.
i have two database tables from Access, both tables have 20 columns and 40000 records with different data.
i need to create a textbox and a search botton, so when i input a person's name in the textbox i can search both tables' records. if i can find it in the first table then i don't have to search the second table but if i can't find it in the first table then i have to search the second table. when i find a person in the tables, i would like to have that person's info from those 20 columns display in 20 different textboxes on the form.
so i have connected to the database and checked to see if the name is in both tables but i can't get the result onto textboxes. how can i do that?
thank you.
VB.NET:
'checking table 2
Dim command2 As New OleDb.OleDbCommand("select * from far_inactive where fund_no = '" & txtSFund.Text & "'", command.Connection)
Dim dr2 As OleDbDataReader = command2.ExecuteReader
If dr2.HasRows = False Then
Exit Sub
Else
txtFundNo.Text = dr2.Item(1).value