Hi all,

I have a procedure that opens an MS Access database and updates an MS Excel spreadsheet with the data. This process is taking 20 plus minutes to complete because I am closing the ado recordset after each time data is read in from the Access table. Is there a way around the call to "Close" the ado recordset before the sql statment is executed.

Thanks for any help on this issue...

Larry....

Code:
 dbFullName = "C:\Documents and Settings\Larry.Bargers\Desktop\Test Data\CHIPSforACAPS.mdb"

    Set conn = New ADODB.Connection
    
    conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & dbFullName & ";"         ' open the ATLAS database
    
    Set recSet = New ADODB.Recordset
    'recSet.CursorLocation = adUseServer     'uses Cursortype "adUseServer" for faster more efficient retrieval of records
        
    rowValue = 2
    
    Do Until rowValue = 14675
    
        strSQL = "Select * from CHIPSforACAPS WHERE [APPLICATION NUMBER] = '" & Me.Cells(rowValue, 2) & "'"
        recSet.Open strSQL, conn, adOpenDynamic, adLockOptimistic, adCmdText
           
        Me.Cells(rowValue, 50) = recSet![DENIAL CODE 2]
        Me.Cells(rowValue, 51) = recSet![DENIAL CODE 3]
        Me.Cells(rowValue, 52) = recSet![PRE-APPROVAL]
        
        recSet.Close
        
        rowValue = rowValue + 1
    Loop