Results 1 to 6 of 6
  1. #1
    andreala is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    1

    Automate Access Queries


    Hello All,

    I run a daily Access query and trying to automate that process so I no longer have to run it daily. Is there a way I can do this and have it linked to an excel file? Please help!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    You still want the query to run each day, you just don't want to have to do it manually? Some event must take place to trigger code. Can have code behind a form set as default to open when project opens. You would still have to open the project each day. I have automated this by a VBScript that opens my project. The VBScript is run each day by a task set up in Windows Task Scheduler.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by andreala View Post
    Hello All,

    I run a daily Access query and trying to automate that process so I no longer have to run it daily. Is there a way I can do this and have it linked to an excel file? Please help!
    You can create a windows task to run a program each day. I believe (almost sure) you can tell the task manager to open a path. if that is so, just run the query on startup and after that shut it down.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I tried to find a way for Task Scheduler to open a specific Access file but no success so went with the VBScript.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by June7 View Post
    I tried to find a way for Task Scheduler to open a specific Access file but no success so went with the VBScript.
    June,

    see post #2 here:

    http://social.technet.microsoft.com/...5-ff2cb4ba9da8

    I bet it works. You can also do this with a one liner in a .bat file. Right? That's a good way to ditch vbScript, which is probably more than one line to you?

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I am still running XP and not seeing the options described in that link. Has the task scheduler changed for Vista and Windows7? Oh well, not a big issue, setup I have works satisfactorily. The script is about 3 lines (not with me).
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 0
    Last Post: 08-20-2010, 09:26 AM
  2. Replies: 5
    Last Post: 07-15-2010, 10:05 AM
  3. Automate sending SMS form MS Access
    By Johan in forum Programming
    Replies: 8
    Last Post: 04-15-2010, 12:51 AM
  4. Automate Excel Import to Access Related Tables
    By KramerJ in forum Programming
    Replies: 6
    Last Post: 04-04-2009, 04:24 PM
  5. How to automate a access query ... Help me
    By kusamharsha in forum Programming
    Replies: 0
    Last Post: 02-25-2009, 09:44 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