Exporting search results to Excel.

pikoy

Registered User.
Local time
Today, 07:01
Joined
Dec 23, 2009
Messages
65
First off, forgive me if this is posted in the wrong discussion thread. Just dont know where this goes.

Here is my issue: I am trying to export data that has been filtered by a few search criteria. The search form that i have contains a subform at the bottom that displays the results ( and those are the results i want to export to excel.

I am using MS Office 2007.

any thoughts will be very much appreciated.

Thank you
 
You could use this code that Bob Larson has on his site. You have to pass the form so you would pass the subform like this:

Send2Excel Me.YourSubformControlName.Form

I believe that's how you would call it.
 
I use this method to export queries that use search criteria derived from forms all the time. Of course, I never use the form filtering approach so it hadn't occured to me that he wasn't using a parameter query as the source for his subform.
 
thank you very much Craig and SOS... i will try that suggestion and will let you guys know.
 
I tried it out... but it seems to export all items in my subform. Am i doing something wrong?
 
I tried it out... but it seems to export all items in my subform. Am i doing something wrong?

Tried what out? The TransferSpreadsheet? That would export all items unless there was a way to limit it. The code I referred to should work on a filtered form.
 
Tried what out? The TransferSpreadsheet? That would export all items unless there was a way to limit it. The code I referred to should work on a filtered form.


Thanks SOS. Got it to work using the code provided. It was calling the wrong subform - one without the filter.
 

Users who are viewing this thread

Back
Top Bottom