Crosstab Query Exported from Access to Excel

A

Aaron Reid

I am trying to export a crosstab query into an Excel spreadsheet. Using DAO in Access 2000, I can use the following code to work for
the first row but how do I reference the second and third rows from the crosstab? After the export is successful, the data is used
for a chart.

ExcelWRK.Cells(2, 1).Value = "Title One"
ExcelWRK.Cells(3, 1).Value = "Title Two"
ExcelWRK.Cells(4, 1).Value = "Title Three"
ExcelWRK.Cells(2, 2).Value = rs.Fields(J + 5).Value

Thanks for any help!

AJR
 
S

Steve Gerrard

Aaron Reid said:
I am trying to export a crosstab query into an Excel spreadsheet. Using DAO in
Access 2000, I can use the following code to work for
the first row but how do I reference the second and third rows from the
crosstab? After the export is successful, the data is used
for a chart.

ExcelWRK.Cells(2, 1).Value = "Title One"
ExcelWRK.Cells(3, 1).Value = "Title Two"
ExcelWRK.Cells(4, 1).Value = "Title Three"
ExcelWRK.Cells(2, 2).Value = rs.Fields(J + 5).Value

Thanks for any help!

AJR

There is nothing special about your recordset just because the records came from
a crosstab query. When you are done with the first record, you do rs.MoveNext to
go the next row.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top