OutputTo file name

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

Guest

I have the OutputTo command list below to save the results as an Excel file
with a file name of Store Shipments. I run this off of a form where you
select a UPC using a drop down list(UPCCOMBO). Is there a way to set this up
where instead of saving using the file name Store Shipments it could list the
UPC that I selected from the drop down list as the file name?


Private Sub cmdExport_Click()
DoCmd.OutputTo acOutputTable, "Orders Y/N - Results", acFormatXLS,
"S:\Marketing\Void Reports\Store Shipments .xls", False
 
Yes
DoCmd.OutputTo acOutputTable, "Orders Y/N - Results", acFormatXLS,
"S:\Marketing\Void Reports\" & Me.Combo0.Value & ".xls", False

HtH

Pieter
 
Thanks Pieter.

This might be asking a bit much, but is there a way where the tab in Excel
could be renamed the UPC that is entered in the drop down list as well?
 
yes, but that would include using the transferspreadsheet method & a
temporary query named as the UPC number

Pieter
 
Back
Top