Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FieldNames via Recordset

Status
Not open for further replies.

matrixknow

IS-IT--Management
May 3, 2007
78
Hola,

My workbook gets his result from the recordset (from the query)
I need my columntitles. The names of my queryheadings are changeable (it is a crosstab which show the months and these are not fixed in this case). Can I retrieve the column heads along my recordset ? Below is not working.

Code:
xlWorkSheet.Cells(iRow, iCol) = rst.Fields(iFld).NAME
 
sorry, I think this is the correct way to get the names of the fields. I did some test. I fix the bug.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top