title: Access 2010, Input Filename with added text at end
body: <p>I have a text string which is the filepath followed by filename.
  Here is an example:
  \server\folder\subfolder\OUTPUT\filename_05272015.xlsx
  filename could also be this:
  \server\folder\subfolder\OUTPUT\filename2_05272015.xlsx</p>
  
  <p>What I am trying to accomplish is this: take current filename based on what user selected as "Input" and output will be that filename with _Modified.xlsx on the end.</p>
  
  <p>These filenames are Dim'd in my VB </p>
  
  <pre><code> Dim CurrentFile as string
   Dim strPath as string
     CurrentFile = Mid(me.Text1,34,18)
     strPath = Me.OutputFolderText &amp; "\" &amp; CurrentFile &amp; "_Modified.xlsx"
   DoCmd.TransferSpreadsheet acExport, 10, "qry_MyQuery", strPath
  </code></pre>
  
  <p>Problem is the output filename looks like this:</p>
  
  <p>filename2_05272015_Modified.xlsx
  and then</p>
  
  <p>filename_05272015._Modified.xlsx where there is a "." after the MMDDYYYY</p>
  
  <p>I am trying to figure out how to get all variations to have an accurate output filename _05272015_modified.xlsx</p>
  
  <p>The text before the _MMDDYYYY may change.  _MMDDYYYY_Modified.xlsx will always be on the end of the filename.</p>