Hi
I have a list box which displays sales figures - the data has been transformed into a more user-friendly layout using sql in a complicated vb process.
On the same form i wish to create a button which the user can press to export the listbox data/layout onto a spreadsheet.
Im hoping for the button to grab the rowsource of the listbox and use this sql to specify the query in the export statement - is this possible? (This will prevent me having to change the already complicated vb process)
ie. i tried this but cannot get it working!
getRowSource = me.salesbox.rowsource
DoCmd.TransferSpreadsheet asExport, asSpreadsheetTypeExcel9, getRowSource, "C:\myfolder\exports
Many Thanks
I have a list box which displays sales figures - the data has been transformed into a more user-friendly layout using sql in a complicated vb process.
On the same form i wish to create a button which the user can press to export the listbox data/layout onto a spreadsheet.
Im hoping for the button to grab the rowsource of the listbox and use this sql to specify the query in the export statement - is this possible? (This will prevent me having to change the already complicated vb process)
ie. i tried this but cannot get it working!
getRowSource = me.salesbox.rowsource
DoCmd.TransferSpreadsheet asExport, asSpreadsheetTypeExcel9, getRowSource, "C:\myfolder\exports
Many Thanks