i am trying to coonect ms access with vb6. The code is working but after i execute "SELECT * from table" it is showing the content for the last row in the ms access. I am wondering how i can change my code so it display all the content instead of jst the last row. Here is my code:
Private Sub Command1_Click()
Dim DB_ACCESS As Database
Dim recset As Recordset
Dim connString As String
Dim bdName As String
Dim sqlString As String
connString = "ODBC;DSN=" & dbName & "UID=" & "" & ";PWD=" & "" & _
";DATABASE=" & bdName
Set DB_ACCESS = OpenDatabase(App.Path & "\db1.mdb")
sqlString = "SELECT * FROM table1"
Set recset = DB_ACCESS.OpenRecordset(sqlString, dbOpenDynaset)
Text1.Text = recset.Fields(0) & " " & recset.Fields(1) & " " & recset.Fields(2)
End Sub