UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Exportwithformatting Macro Output File Location, Access 2016    
 
   
top_jimmy44
post Sep 13 2017, 02:02 PM
Post#1



Posts: 471
Joined: 7-December 04



I have a database macro that uses ExportWithFormatting to create an Excel file using the following in the "Output file" section.

="Export_For_Job_" & [Forms]![frmMain]![txtJobID] & "_DateSent_" & Format([Forms]![frmMain]![txtDateSent],"mm-dd-yyyy") & ".xlsx"

I am not the main user of the database, but when the export process is run, it seems that there is no rhyme or reason as to where the file is saved. Sometimes it shows up in the folder where the database is located. Sometimes it shows up in MyDocuments. Other times it ends up in a folder that this user had accessed at some point during the day.

Is there a way for me to edit the string above to make sure it is always saved in the folder where the database "lives"?

Thanks.
Go to the top of the page
 
top_jimmy44
post Sep 13 2017, 02:25 PM
Post#2



Posts: 471
Joined: 7-December 04



I believe I can simply add "=Application.CurrentProject.Path &"\" &" to my existing statement and it will work. It does work on my computer but I'm curious to know if it will work on my main user's computer.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    14th December 2017 - 11:17 PM