I have read examples related to ADO and connecting and opening an Access 2000 database. I have also read in other places about creating a record set object. I have put down a few lines of code but what I am not sure of is putting in and using a recordset object. In the following code what would I have to do to set the sql query to a recordset?
Dim ADOConn As New ADODB.Connection
Dim ADOCom As New ADODB.Command
ADOConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "\ELPALS.mdb"
With ADOCom
.ActiveConnection = ADOConn
.CommandText = "SELECT * FROM TeacherID WHERE TID = " & "Text3.Text"
.Execute
End With
ADOConn.Close
Dim ADOConn As New ADODB.Connection
Dim ADOCom As New ADODB.Command
ADOConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "\ELPALS.mdb"
With ADOCom
.ActiveConnection = ADOConn
.CommandText = "SELECT * FROM TeacherID WHERE TID = " & "Text3.Text"
.Execute
End With
ADOConn.Close