Export Filtered Subform

S

Samantha

I have a filtered subform that's not linked to the main form. The data on the
subform is filtered based on the controls on the main form.
The filtered subform is showing data ok, but the problem is exporting the
filtered data from the subform. I tried OutputTo method, but everytime
exported all the data in its un-filtered list.

Here's what I use on the cmdExport button onclick:
Me.[SpecificDataSearchSubform].Form.FilterOn = True
DoCmd.OutputTo acOutputForm, "SpecificDataSearchSubform", acFormatXLS, , False

How can I export the filtered subform? Any help is very much appreciated.
Thanks in advance.
 
S

Samantha

Hi,
I got rid of the subform and use the main form's detail section to show the
data instead. I placed the searching controls on the main form's header
section, and change form filter for the search options.
This time the data exported to Excel is ok, except that all the control
names on the header section are exported to excel as separate columns. This
will be confusing to the end users.
Is there any way to export just the data from the filtered form? Any help is
very much appreciated! Thanks in advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top