ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CopyFromRecordset (https://www.excelbanter.com/excel-programming/328512-copyfromrecordset.html)

Ernst Guckel[_4_]

CopyFromRecordset
 
Hello,

I have a named range 'DayRange' that I am trying to use the
copyfromrecordset method to move data to a worksheet. The problem is that
the data contains 35 fields and the named range contains 35 cells but the
named range's cells are not continuous. Apparently the copyfromrecordset
method copys the data starting at the first cell in the range and from there
on. It this the case? Is there anyway around this?

Any Ideas would be great,

Ernst.

Wild Bill[_2_]

CopyFromRecordset
 
Can't you just copy to a scratch area, and pluck to your true
destination a la B1=Sheet1!A2 ? Alternatively: Is your recordsource an
Access table? Your recordset could be a query instead of a table, which
returns records with fields

UsefulField1
"Filler"
"Filler"
UsefulField2
UsefulField3
etc.

which orients correctly to your destination.

It's difficult to answer without knowing what your recordset is.

Ernst Guckel[_4_]

CopyFromRecordset
 
Can't you just copy to a scratch area, and pluck to your true
destination a la B1=Sheet1!A2 ? Alternatively: Is your recordsource an
Access table? Your recordset could be a query instead of a table, which
returns records with fields

UsefulField1
"Filler"
"Filler"
UsefulField2
UsefulField3
etc.

which orients correctly to your destination.

It's difficult to answer without knowing what your recordset is.


Recordset is an access table... I have a monthly ledger with data from every
day... The data is stored in an access table but the worksheet has columns
umungst the data...

Ernst.


Tom Ogilvy

CopyFromRecordset
 
Copy from recordset only copys to a contiguous area.

--
Regards,
Tom Ogilvy


"Ernst Guckel" wrote in message
...
Hello,

I have a named range 'DayRange' that I am trying to use the
copyfromrecordset method to move data to a worksheet. The problem is that
the data contains 35 fields and the named range contains 35 cells but the
named range's cells are not continuous. Apparently the copyfromrecordset
method copys the data starting at the first cell in the range and from

there
on. It this the case? Is there anyway around this?

Any Ideas would be great,

Ernst.





All times are GMT +1. The time now is 09:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com