Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ADO Recordset include Field names
How do I modify this code to get the Field names from rec6 to start in column
13? They currently start in column 1, and I've tried modifying it several ways - so far no luck. For nCol = 1 To rec6.Fields.Count Sheets("ACN").Cells(7, nCol).Value = rec6.Fields(nCol - 1).Name Next nCol Sheets("ACN").Cells(8, 13).CopyFromRecordset rec6 Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ADO Recordset include Field names
try it this way:
For nCol = 1 To rec6.Fields.Count Sheets("ACN").Cells(7, nCol+12).Value = rec6.Fields(nCol - 1).Name Next nCol Sheets("ACN").Cells(8, 13).CopyFromRecordset rec6 -- Hope that helps. Vergel Adriano "Kirk P." wrote: How do I modify this code to get the Field names from rec6 to start in column 13? They currently start in column 1, and I've tried modifying it several ways - so far no luck. For nCol = 1 To rec6.Fields.Count Sheets("ACN").Cells(7, nCol).Value = rec6.Fields(nCol - 1).Name Next nCol Sheets("ACN").Cells(8, 13).CopyFromRecordset rec6 Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ADO Recordset include Field names
Perfect, thanks!
"Vergel Adriano" wrote: try it this way: For nCol = 1 To rec6.Fields.Count Sheets("ACN").Cells(7, nCol+12).Value = rec6.Fields(nCol - 1).Name Next nCol Sheets("ACN").Cells(8, 13).CopyFromRecordset rec6 -- Hope that helps. Vergel Adriano "Kirk P." wrote: How do I modify this code to get the Field names from rec6 to start in column 13? They currently start in column 1, and I've tried modifying it several ways - so far no luck. For nCol = 1 To rec6.Fields.Count Sheets("ACN").Cells(7, nCol).Value = rec6.Fields(nCol - 1).Name Next nCol Sheets("ACN").Cells(8, 13).CopyFromRecordset rec6 Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Include Field Names - check box not available in Excel 2007 | Excel Discussion (Misc queries) | |||
Excel 2007 - Include Field Names | Excel Discussion (Misc queries) | |||
Error opening recordset where table is empty (but has field names) - How do I avoid? | Excel Programming | |||
ADO cloned recordset doesn't return field names | Excel Programming | |||
DAO query/recordset returns with field names | Excel Programming |