Dim sqlRS As ADODB.Recordset
Dim sqlString As String
sqlString = "SELECT * FROM [table]"
Set sqlRS = New ADODB.Recordset
sqlRS.open sqlConnection, sqlString, 3, 3
if not sqlRS.eof then
'show amount of found items
'sqlRS.recordcount
do while not sqlRS.eof
'do something with the values from the recordset
'you can use the ordinal position or the named field
'sqlRS.fields(0).value = shows the value the first field
'sqlRS.fields("id").value = shows the value of the named field "id"
sqlRS.movenext
loop
end if
set sqlRS = nothing
Return