Results 1 to 6 of 6
  1. #1
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659

    Export data at the end of every month automagicly


    I would like to export the data from a query at the end of every month. I have thought of making a powershell script to do this and having it set as a scheduled task. Are there any better ways to achieve this? I would prefer the task to be run automagicly.

  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
    Probably whatever tool you're comfortable with. I'd probably create a little Access db that ran the export upon startup and then closed, and run that from Windows Scheduled Tasks. If you go that way, I and many others have run into the problem of an accdb not running from there, but an mdb will.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    I have created an access database to use an autoexec macro like you mentioned PBaldy. It works great on windows XP but gives me a critical error about "There was a problem sending the comand to the program" on windows 7. The file appears to export fine for both OS's, regardless of the error message.

  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
    Curious. Is there something after the export that could cause the error?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    If your database is opened every day (or close to it) can you not have a table that tracks the last export date, and if the current date is greater than the expected 'next' date the export is performed? Then update the 'tracking' table with the new most recent export date.

    You wouldn't need an autoexec macro if you did this, just something in the on load or on open event of your main form.

  6. #6
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    After the export I have an entry for Quit (Exit).

    The database is generally just left open on most users desktops. I want to say when people go home they just leave their front ends open.

    I will be running the database export this evening, thanks to all the ideas and comments.

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

Similar Threads

  1. Replies: 2
    Last Post: 02-12-2015, 05:14 AM
  2. Parse Data by Month
    By dccjr in forum Queries
    Replies: 6
    Last Post: 04-01-2013, 09:15 AM
  3. Replies: 1
    Last Post: 04-12-2011, 06:45 PM
  4. Display data from month x-1 and x-2
    By donodarazao in forum Reports
    Replies: 5
    Last Post: 11-06-2010, 12:57 PM
  5. Tracking End of Month Data
    By spherearrow in forum Database Design
    Replies: 5
    Last Post: 09-13-2010, 10:55 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