Results 1 to 4 of 4
  1. #1
    RayMilhon is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085

    Renameing a File

    I have an Access 2010 Database that runs automatically every Monday morning. There are 2 queries run and the results of each are exported to an Excel file. Then those 2 files are emailed to the recipients. This all works fine the only issue I'm having is that if I get busy and forget to rename the files the next Monday the process errors because the files already exist. I know there's a way in Access VBA to rename those files so after the email is sent I would like to rename both files by adding the rundate to the filename.



    For Example:

    Filename of the emailed file is Claim_Audits_Professional and Claim_Audits_Facility
    After the files are emailed I want to change the filenames To: Claim_Audits_professional_01052018 and Claim_Audits_Facility_01052018

    I know I've done this before I just don't remember how and I've been looking through the documentation but can't find what I'm looking for. Any help is appreciated.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    RayMilhon is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    yep worked perfectly Thanks

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    No problem.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 34
    Last Post: 08-09-2017, 09:57 AM
  2. Replies: 14
    Last Post: 05-24-2017, 02:22 PM
  3. Replies: 1
    Last Post: 03-03-2017, 09:25 PM
  4. Replies: 10
    Last Post: 03-04-2012, 12:17 AM
  5. Renameing a form
    By Tony McGuire in forum Forms
    Replies: 1
    Last Post: 09-11-2011, 09:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums