Advertisement

04.18.2008 at 11:54PM PDT, ID: 23336228
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.5

Trigger Access to Execute a Query on a Reoccurring Basis

Asked by redrumkev in Access Reports, Microsoft Access Database, SQL Query Syntax

Tags: , ,

Hello Experts,

I have a query (actually many different ones) but for now, just this one that must be ran every month. It finds activity codes from users which are then exported to Excel and finally copied to a separate Excel spreadsheet which has pivot tables and pivot charts to display what happened during the previous month of operations.

What I would like to do is have this query automatically executed at a given time. For instance, the last query (see below for SQL cut from Access) was for the date range of

3/1/2008 to 3/31/2008 and was ran sometime during the first week of April.

Can I make this automatically run for April (4/1/2008 to 4/30/2008) on May 1st and save the results as an exported Excel spreadsheet (97-2003, .xls format)? Then have it continue to run month after month (next would be 5/1/2008 to 5/31/2008) on June 1st, etc, for ever?

My level of skill in Access is definitely beginner, I just use it to create and run stored queries, but am more than willing to learn and really want to!

SELECT dbo_CONTHIST.LASTUSER, dbo_CONTHIST.ACTVCODE, dbo_CONTHIST.RESULTCODE, dbo_CONTHIST.ONDATE, dbo_CONTACT1.KEY1, dbo_CONTACT1.KEY2, dbo_CONTACT1.KEY3, dbo_CONTACT1.KEY5, dbo_CONTACT1.COMPANY, dbo_CONTACT1.CONTACT, dbo_CONTACT1.SOURCE, dbo_CONTHIST.REF, dbo_CONTHIST.NOTES
FROM dbo_CONTACT1 INNER JOIN dbo_CONTHIST ON dbo_CONTACT1.ACCOUNTNO = dbo_CONTHIST.ACCOUNTNO
WHERE (((dbo_CONTHIST.ACTVCODE)="AAI" Or (dbo_CONTHIST.ACTVCODE)="AAX" Or (dbo_CONTHIST.ACTVCODE)="AGA" Or (dbo_CONTHIST.ACTVCODE)="CCL" Or (dbo_CONTHIST.ACTVCODE)="COM" Or (dbo_CONTHIST.ACTVCODE)="LPA" Or (dbo_CONTHIST.ACTVCODE)="NGA") AND ((dbo_CONTHIST.ONDATE) Between #3/1/2008# And #3/31/2008#))
ORDER BY dbo_CONTHIST.ACTVCODE, dbo_CONTHIST.RESULTCODE, dbo_CONTHIST.ONDATE;

P.S., I will not be able to respond for 8 hours or so (going to bed in a few minutes)!

Thank you,
Kevin
Start Free Trial
[+][-]04.19.2008 at 12:36AM PDT, ID: 21391521

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Reports, Microsoft Access Database, SQL Query Syntax
Tags: Microsoft, Access, 2003 - SP1
Sign Up Now!
Solution Provided By: peter57r
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.19.2008 at 01:04AM PDT, ID: 21391575

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.19.2008 at 10:00AM PDT, ID: 21393168

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628