Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2007
    Posts
    17

    Unanswered: Running a Query Daily

    I have this small access database on one of our servers. There is a query someone runs a few times a day. Is there a way for me to set this query to run say 4 times a day automatically and delivery the results in an email to the person in an excel file.

    Suggestions?

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    yes
    use the windows scheduler.. either on the server or on a client workstation (assuming that the workstation will always be on, or at least will always be on during the times you need the process to run)

    Place the query youneed to run in a macro or called from a function

    call access from the windows scheduler opening the appropriate db, password and specifying what function or macro you want to work

    strong the result of that in an excel file should be easy enough to do... have a look int he code bank for Pootle Flumps excel stuff... its pretty neat.....

    as to how you send an email..... that depends on your eamil system, the client you are using. if you use outlook then you may need to use a secondary program.... again I think there is somehting in the code bank from PK Stormy.. if it itsn't in the code bank then do a search in this forums.. I know this question has been asked several times before

    simple it aint....
    good luck

  3. #3
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    For a more elegant solution, you may want to consider buying SQL Server 2005, installing it, and creating an SQL Server job. The goal of any developer is to do the least amount of work possible to solve a problem, and for those who are successful are able to enjoy extended lunch breaks, later starts, more pints, etc.

    Regards,
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    The keyword in that sentence is "buying"

    I have to ask - what is the query that is run a number of times a day? Sounds like an insert or update... depending on what it is there may be a way to eliminate the operation altogether.

    PaulStoj - fancy posting your SQL along with a brief description on what it does here?
    George
    Home | Blog

  5. #5
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    I love your use of the word fancy in that reply. A penetrating chortle was heard by all within my room, but no one knew why but I.

    Regards,
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

Posting Permissions

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