superhorse
Registered User.
- Local time
- Today, 06:44
- Joined
- Apr 14, 2008
- Messages
- 13
Hi
I was wondering how easy it is to sum a field based on a certain month.
To explain further, at the moment I have a form that does several calculations. One of which uses the sum function to calculate the total of a cost field in a different form. I would now like to change it so that instead of calculating the whole total, it just calculates the total cost for the current month.
On the form that has the cost I have the date for each record in the format dd/mm/yyyy
On the form that the calculation is being worked out on I have a date value which defaults as the current date in the format dd/mm/yyyy
I am hoping that there is some sort of code that when I open my calculations form it will look at todays date and match up the month and the year with the month and the year in the cost field of the second form and then sum each of the values, giving me the total cost for the current month.
Hopefully there are a few brainboxes out there that can help me with this one. Hopefully I didn't confuse you too much.
Cheers.
I was wondering how easy it is to sum a field based on a certain month.
To explain further, at the moment I have a form that does several calculations. One of which uses the sum function to calculate the total of a cost field in a different form. I would now like to change it so that instead of calculating the whole total, it just calculates the total cost for the current month.
On the form that has the cost I have the date for each record in the format dd/mm/yyyy
On the form that the calculation is being worked out on I have a date value which defaults as the current date in the format dd/mm/yyyy
I am hoping that there is some sort of code that when I open my calculations form it will look at todays date and match up the month and the year with the month and the year in the cost field of the second form and then sum each of the values, giving me the total cost for the current month.
Hopefully there are a few brainboxes out there that can help me with this one. Hopefully I didn't confuse you too much.
Cheers.