Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Posts
    8

    Smile Unanswered: Filename creation with Datestamp

    Background: I can write a macro to export a report from Acess to someting like a snapshot file. (c:\directory\subdirectory\filename.snp)

    Request: I want to add the datestamp to after the the filename: c:\directory\subdirectory\filename.snp

    Ending result: (c:\directory\subdirectory\filename_20090818.snp) or any date format.

    Thanks in advance for your assistance.

    LouisC

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    MyFileName = "<path>" & "\filename" & format (now(),"YYYYmmdd_HHMMSS") & ".snp"


    you may need to tinker with the correct mask for the the date format but the help system should be able to assist you there
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Aug 2009
    Posts
    8

    Filename area

    First of all, I newbie with Access. Secondly, can this syntax be in a macro or should create a procedure? Where and how would this look like in a macro or procedure?

    Sorry for not clearing myself the first time, but I'm getting an error stating my drive is full.

    Thanks for your assistance on this.

    Louis

  4. #4
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    CLick once on the Macro

    them tools -> Macro -> convert macro to VB

    Then have a look at the Code and chnage the to Healdem idea

    This is how I leant VB macro it first then convert to vb after.
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •