OutputTo file name

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
 
P

Pieter Wijnen

Yes
DoCmd.OutputTo acOutputTable, "Orders Y/N - Results", acFormatXLS,
"S:\Marketing\Void Reports\" & Me.Combo0.Value & ".xls", False

HtH

Pieter
 
G

Guest

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?
 
P

Pieter Wijnen

yes, but that would include using the transferspreadsheet method & a
temporary query named as the UPC number

Pieter
 

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