Hello All-
I am creating a call log database and need help with some of the logic. When the supervisor clicks the submit button for a particular call for one of their associates I need to check what month we are in and then find how many calls have been submitted for that month. (I have a date field for when the call was submitted) If the calls submitted sum to 20 within which ever month we are in than a messagebox is going to need to populate stating 20 calls have been submitted
I was thinking about placing a hidden text box with the month number in it. Then I would set up a sql query to pull all of the recordsets that are in that particular month. If the recordcount is 20 then it would throw the message box.
The problem is I do not feel like writing 12 if statements to say"if we are in month 1 then run the sql query from 1/1/2010 to 1/31/2010.
If we are in month 2 then run sql query with date parameters 2/1/2010 to 2/28/2010.
PLus the year will change so I would have to change the code.
Any ideas???? Thanks a ton guys!!!
Tallman
I am creating a call log database and need help with some of the logic. When the supervisor clicks the submit button for a particular call for one of their associates I need to check what month we are in and then find how many calls have been submitted for that month. (I have a date field for when the call was submitted) If the calls submitted sum to 20 within which ever month we are in than a messagebox is going to need to populate stating 20 calls have been submitted
I was thinking about placing a hidden text box with the month number in it. Then I would set up a sql query to pull all of the recordsets that are in that particular month. If the recordcount is 20 then it would throw the message box.
The problem is I do not feel like writing 12 if statements to say"if we are in month 1 then run the sql query from 1/1/2010 to 1/31/2010.
If we are in month 2 then run sql query with date parameters 2/1/2010 to 2/28/2010.
PLus the year will change so I would have to change the code.
Any ideas???? Thanks a ton guys!!!
Tallman