Hello! Using Access 97, I need to figure out how do get a month-to-date average of new records added to a table. The table has an "Opening Date" field which defines what day a new record is added. In order to accomplish my goal, there are several pieces of SQL that I'm going to need to put to use, some of which I already know. First, to pull up a whole month's worth of new records:
This will prompt the user to enter a month, like dec 2005, and will give us all of the new records created for that month. Next, I have a custom module that will count the difference in business days between two dates (BusDays([stdt], [enddt]), also accounting for holidays (located in another table.) I'm hoping to use that module to give me the current count of business days in the month that the user has entered to use as the divisor of the total count of records for that month to give me an average per business day figure. However, I do not know how to tell my module that [stdt] = "The First of the Month".
I will be more than happy to supply more information as needed, but I'd like to try and write the details of the code out for myself as much as possible instead of having someone write the whole thing for me =) Please advise, and thank you in advance!
P.S. If there is an easier way to do this, I'm open for moving in a different direction as well. Thanks again!
Code:
SELECT Format([Opening Date],"mmm yyyy") AS rMonth
FROM Escrows
WHERE (((Format([Opening Date],"mmm yyyy"))=[Enter Month/Year]));
I will be more than happy to supply more information as needed, but I'd like to try and write the details of the code out for myself as much as possible instead of having someone write the whole thing for me =) Please advise, and thank you in advance!
P.S. If there is an easier way to do this, I'm open for moving in a different direction as well. Thanks again!