Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2009
    Posts
    6

    Unanswered: Auto Save report with incremental Date

    Hello,

    I have some reports I want to run auto save in an external folder everyday. I have created a macro to run the "OutPutTo" function and save the report as a snapshot (.snp) file. The issue is that it wants to always use the same name and overwrite the existing saved file. I need to get the filename to change automatically so it always creates a new file and doesnt prompt an overwrite msg box.. I would like the difference in file names to be the date at the front or end of the report name. Can anyone show me the code to get this to work??

    I Also need to macro to run based on an active timer I have set up.

    I have a form called FORM1 that auto opens up a timer with the active date and time. In that form in properties the "on Timer" i want the command to run the macro I created. Can you also help with this code??

    Thanks!!

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Sounds too easy using VBA, but I have no idea how to change the caption of a report using macros... I never use macros to that extent.

    The aim would be to change the caption of the report after opening it. In VBA you could put:

    Me.Caption = Format(Date(),"yyyymmdd")

    Or whatever name you want to give it in the On Open event for the report.

    As for the timer issue... again, too easy. Just put the name of the macro in the OnTimer property. Or better yet, convert the macro to VBA and put the VBA behind the event.

    [Event Procedure] >>>> macros !!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Oct 2009
    Posts
    6
    Changing the report name on open should work but the Me.Caption code you provided above is not working for me. Can you give me an example on how it should be too look like the name below and have only the date change?

    Paint Usage report 1st shift 10-29-09

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Me.Caption = "Paint Usage report 1st shift " & Format(Date(),"mm-dd-yy")
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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