G
Guest
I can't get the CopyFromRecordset method to start at a specific row
Details
Using Access and Excel 2000, rst is an adodb.recordset in an mdb, range is an excel.range object
"range.CopyFromRecordset rst" works as expected
"range.CopyFromRecordset rst, 10" copies the first 10 records as expected
But after moving to some record, e.g. using "rst.move 5", "range.CopyFromRecordset rst, 10" will still copy the first 10 records of the rst, instead of starting with the 5th record as I want it to
According to http://msdn.microsoft.com/library/d...n-us/owcvba10/html/ocmthCopyFromRecordset.asp copying should begin at the current row of the recordset. (In fact, the first row becomes the current row when I call the CopyFromRecordset method, don't know why...
Please help! Thanks.
Details
Using Access and Excel 2000, rst is an adodb.recordset in an mdb, range is an excel.range object
"range.CopyFromRecordset rst" works as expected
"range.CopyFromRecordset rst, 10" copies the first 10 records as expected
But after moving to some record, e.g. using "rst.move 5", "range.CopyFromRecordset rst, 10" will still copy the first 10 records of the rst, instead of starting with the 5th record as I want it to
According to http://msdn.microsoft.com/library/d...n-us/owcvba10/html/ocmthCopyFromRecordset.asp copying should begin at the current row of the recordset. (In fact, the first row becomes the current row when I call the CopyFromRecordset method, don't know why...
Please help! Thanks.