Good afternoon all,
I have built a DB with a series of forms and I am looking to output data to excel.
I have a main form containing some buttons and a subform which is a datasheet. I can filter the datasheet using the datasheet filtering properties.
However when exporting that datasheet, it exports the contents of the subform, which is fine when no filters are applied, but when I apply filters it does not export what I see, it exports all of the data
How can I export just what I see, or do I have to build a query based on my filtering and then export the query?
Further to this, if I have records displaying in my datasheet, and highlight just one row, can I export that one row? I could probably utilise the selected row ID to pull the data.
Cheers
Larry
I have built a DB with a series of forms and I am looking to output data to excel.
I have a main form containing some buttons and a subform which is a datasheet. I can filter the datasheet using the datasheet filtering properties.
However when exporting that datasheet, it exports the contents of the subform, which is fine when no filters are applied, but when I apply filters it does not export what I see, it exports all of the data
Code:
DoCmd.OutputTo acOutputForm, [Forms]![MainForm]![SUBFormControlName].Form.Name, acFormatXLS, "C:\temp\exportSub.xls"
How can I export just what I see, or do I have to build a query based on my filtering and then export the query?
Further to this, if I have records displaying in my datasheet, and highlight just one row, can I export that one row? I could probably utilise the selected row ID to pull the data.
Cheers
Larry