End of Record?
What I'm doing is accessing an Access db, returning a recordset, and cycling through the recordset inserting the data into an excel file
(any suggestions are appreciated, too, btw)
what I'm having trouble with is my loop. is there a way to determin when reading the fields that it is at the end of a record, and proceed to the next one? I have part of my loop commented out, but...
i have...this:
q = "SELECT * FROM " & tableName
Call DoQuery(cn, q, cmd, rsResults)
count = 0
xlCol = 0
If rsResults.EOF = False Then
rsResults.MoveFirst
Do
' Do
' moWB.Sheets("Sheet1").Cells(count + 1, xlCol + 1).Value = rsResults.Fields(xlCol)
' xlCol = xlCol + 1
' Loop Until rsResults.c
rsResults.MoveNext
count = count + 1
Loop Until rsResults.EOF = True
End If
Call closeConnection(cn, cmd, rsResults)
thanks in advance!

