Automatic Data Updates in Access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • newnewbie
    New Member
    • Nov 2006
    • 54

    Automatic Data Updates in Access

    Hi,
    It might be a lot to ask from Access, but is there a way to have Access update/append/replace all the tables I need updated/replaced on its own (without the user opening the database, clicking buttons, etc.). In other words - is there a code/anything that can tell the database to wake up and run the queries/macros at 3 a.m. in the morning, for example.
    Thank you!
    Lena
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    I've never done it, but with XP you can create a Scheduled Task to run at a specified Date/Time. The Scheduled Task would be Microsoft Access opening a specific Database with the /x Option (Run Macro). You could virtually do anything within the confines of the Macro. As previously stated, I've never done this, so you are basically on your own with this approach. Hope this helps.

    Comment

    • newnewbie
      New Member
      • Nov 2006
      • 54

      #3
      Originally posted by ADezii
      I've never done it, but with XP you can create a Scheduled Task to run at a specified Date/Time. The Scheduled Task would be Microsoft Access opening a specific Database with the /x Option (Run Macro). You could virtually do anything within the confines of the Macro. As previously stated, I've never done this, so you are basically on your own with this approach. Hope this helps.
      That's great news for a start!
      Thank you!
      Lena

      Comment

      • newnewbie
        New Member
        • Nov 2006
        • 54

        #4
        Found this on the topic:

        Comment

        • ADezii
          Recognized Expert Expert
          • Apr 2006
          • 8834

          #5
          Originally posted by newnewbie
          You can forget the Timer() approach since Access and the associated Form containing the Timer() Event code must be open.

          Comment

          • newnewbie
            New Member
            • Nov 2006
            • 54

            #6
            Originally posted by ADezii
            You can forget the Timer() approach since Access and the associated Form containing the Timer() Event code must be open.
            Thank you. I'll explore the scheduled task...

            Comment

            • LBryant
              New Member
              • Mar 2008
              • 18

              #7
              I've used a DOS batch file as a shortcut to open Access and run a specific Macro. It's what ADezii is referring to, I believe. In a notepad file type:

              Code:
              @echo off
              "[full path to local Access application]" "[full path to database]"/x "[Name of Macro]"
              cls
              For example:

              Code:
              @echo off
              "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "\\Pclfile2\ccwork\Communication Business System\media calendar.mdb"/x "GraphicsRequest"
              cls
              Save the file as *.bat

              Comment

              • newnewbie
                New Member
                • Nov 2006
                • 54

                #8
                Originally posted by LBryant
                I've used a DOS batch file as a shortcut to open Access and run a specific Macro. It's what ADezii is referring to, I believe. In a notepad file type:

                Code:
                @echo off
                "[full path to local Access application]" "[full path to database]"/x "[Name of Macro]"
                cls
                For example:

                Code:
                @echo off
                "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "\\Pclfile2\ccwork\Communication Business System\media calendar.mdb"/x "GraphicsRequest"
                cls
                Save the file as *.bat
                Thanks much!
                I'll let you know how it worked!

                Comment

                Working...