Adding filter to query

  • Follow


I'm trying to export to excel the filtered results of an underlying query on 
a split form.  In the on click event of a command button I create a querydef 
and then use transfer spreadsheet to create an Excel workbook.  The code 
creates the spreadsheet, but it includes all the records.  I need to make it 
create only the filtered records.  I've tried several methods, but can't seem 
to figure this out.  Any help will be greatly appreciated.

TIA,

Ken
0
Reply Utf 4/16/2010 9:59:02 PM

I just answered a question just like this yesterday.  I got a green check for 
it!  Maybe I will get another today...


Here's one way: 
http://www.datapigtechnologies.com/AccessMain.htm 

Go to the bottom of the page and download this file: 'DataPig Access 
Explosion' 

Here's a video on how it works: 
http://www.datapigtechnologies.com/flashfiles/accessexplosion.html


Another GREAT resource:
http://www.accessmvp.com/KDSnell/EXCEL_Export.htm


-- 
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Ken Warthen" wrote:

> I'm trying to export to excel the filtered results of an underlying query on 
> a split form.  In the on click event of a command button I create a querydef 
> and then use transfer spreadsheet to create an Excel workbook.  The code 
> creates the spreadsheet, but it includes all the records.  I need to make it 
> create only the filtered records.  I've tried several methods, but can't seem 
> to figure this out.  Any help will be greatly appreciated.
> 
> TIA,
> 
> Ken
0
Reply Utf 4/16/2010 10:45:01 PM


1 Replies
326 Views

(page loaded in 0.039 seconds)

Similiar Articles:
















7/17/2012 5:16:46 PM


Reply: