Hello friends,
I am not able to retrieve the data from database in text boxes through combo box.Where combo box contains roll no which is when selected shows the related information of that roll no from that database.
Hello friends,
I am not able to retrieve the data from database in text boxes through combo box.Where combo box contains roll no which is when selected shows the related information of that roll no from that database.
Sure i will help you out with this before that may i know by which Database are you using for your connectivity.
I am using adodc as my Connectivity Database
Try to use the following code and i am sure it will work for you and try to use ADODB
Code:Option Explicit Private Sub Command1_Click() Dim esql As String esql = "select * from testable where RollNo=" & val(Text1) Adodc1.RecordSource = esql If Adodc1.Recordset.RecordCount > 0 Then Adodc1.Refresh label1= Adodc1.Recordset.Fields(0) label2=adodc1.recordset.fields(1) 'and so on 'better to use Labels so that user does not change data as in Textbox End If End Sub
Bookmarks