LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default CopyFromRecordset - Is there a way to filter data that's copied?

Here's the code:

For iCol = 1 To fldCount
xlWs.Cells(1, iCol).Value = rst.fields(iCol - 1).Name
Next
xlWs.Cells(2, 1).CopyFromRecordset rst

I'd like to limit the data copied based on the contents of field 1 and
2 (which are named SALE and LOT in my source MS-Access query "rst").

I have a cell in the spreadsheet with the desired SALE and LOT. I
read these two text strings into the VB code, but don't know the
syntax to limit the CopyFromRecordset method (if it's even possible).

Thanks, Mark
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Sample for Oracle-to-Excel extraction with CopyFromRecordset Keith Clark Excel Discussion (Misc queries) 0 January 22nd 09 07:31 PM
CopyFromRecordset Problem sunzj Excel Discussion (Misc queries) 0 August 2nd 07 06:32 PM
Format data in Excel after using copyfromrecordset jj Excel Discussion (Misc queries) 2 June 13th 07 06:48 AM
CopyFromRecordset only pastes 1823 characters in a cell!? Julian Milano Excel Programming 5 August 11th 03 12:45 AM
Copyfromrecordset Bug ? news.btx.dtag.de Excel Programming 1 August 1st 03 07:44 PM


All times are GMT +1. The time now is 05:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"