[AccessD] Connect to SQL and retrieve records

Demulling Family demulling at centurytel.net
Tue Oct 30 21:03:29 CDT 2007


Darren,

Here is one way:

Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim cmdtext As String

cmdtext = "SELECT"
cmdtext = cmdtext & " tblSEILinks.SEIAccountNumber"
cmdtext = cmdtext & " FROM tblSEILinks"
cmdtext = cmdtext & " GROUP BY tblSEILinks.SEIAccountNumber;"

con = setconnection
con.Open

rs.Open cmdtext, con

If Not rs.BOF And Not rs.EOF Then
        rs.MoveFirst

        Do Until rs.EOF
            rs.MoveNext
        Loop
End If

rs.Close
con..Close
set rs = Nothing
set con = Nothing



More information about the AccessD mailing list