Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a access database which have two table.

1. student ID and name
2. Details ID, Age, Course Name, Completion date, Language

I want to create window application from VB 2010. using combobox I select student name and its details come in text box given in same form.

Can any one give me code for this.

Thanks in advance,

Avinash
Posted
Comments
thanh_bkhn 4-Jul-13 2:18am    
I think no one would give you the code. You should code on your own, and post your question here if there is any problem.

1 solution

Set data of details table in a datatable say sDetails
then use following code :

Dim DRow As DataRow
DRow = sDetails.Select("Your Student or Detail Id = '" & Your Combobox Text & "'").FirstOrDefault
If Not DRow Is Nothing Then
'Set your Textbox using
Yourtextbox.text = DRow.Item(0)
End If
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900