Dim Conn As ADODB.Connection
Dim rst As New ADODB.Recordset
Dim strSQL As String
Dim i As Integer
Set Conn = CurrentProject.Connection
strSQL = "Select * FROM tblTest;"
rst.Open strSQL, Conn, adOpenKeyset, adLockOptimistic
If Not rst.EOF Then
.....
Else
.....
End If
rst.Close
Set rst = Nothing
Set Conn = Nothing