Export Filtered Subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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!
 
Back
Top