Access Recordset Rows to Excel
I've done a bit of excel object programming but am looking for a good way to
iterate through a MS Access recordset pasting the group header field to a
column then move to the next row before pasting the disired fields to a row
in the Excel sheet and continue pasting the rows until I reach the next
group and then paste that group header and so on. Any ideas? Thanks!
My initial code looks like this:
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Dim mCatCode As String
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Add
Set rstRs = dbPM.OpenRecordset(sqlRS, dbOpenSnapshot)
rstRs.MoveFirst
mCatCode = rstRs!CatCode
Do While rstRs.EOF < True
|