Dim conexao As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim Sql As String
With conexao
.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source= banco.mdb;"
.Open
End With
Sql = "SELECT * from tabela WHERE nome = '"& text1.text &"' ORDER BY nome"
rst.Open Sql, conexao