neil12sc
New member
- Local time
- Today, 10:27
- Joined
- Feb 11, 2021
- Messages
- 10
Dear Sirs/Madams,
Dear all,
I am Wilfred Cooray from Sri Lanka, I found this forum while searching for a forum to get simple answers to problems. Hope I will be able to help you also.
My First problem with you is about Date calculation. The attachment is an Excel sheet that tries I am trying to describe the problem I have in Access 16.
This is about a Sunday school teachers (staff). Teachers are allowed to take leave for any valid reason like for examination, weddings, traveling abroad, etc. However, when calculating service total leave taken for more than 3 weeks at a stretch will not be counted when calculating the Service of the teachers. I am making a Database for Sunday school teachers with MS Access.
These codes are the fields in Access also.
Reg Registered date
Lef1 Left (date) to sit for an examination say (Part1)
Rtd1 Returned to school date
Lef2 Left to sit for the same (Part2) or another examination etc
Rtd2 Returned to school for the 2nd time.
Retd Retired Date.
Serv1 Service up to the 1st leave from Reg date.
Serv2 Service from the 1st Returned date (Rtd1) date to (Lef2) date
J+K Serv1+Serv2 (fields in Access for Service 1 and Service2)
Service to date taking Date() as a present date.
The last Column is Calculation Service to date assuming the teacher has not taken any leave.
In excel when fields from Lef1 to Rtd2 Not filled I got minus (-) values. In Access do not get any value at all. So, teachers, No 1 and 2 give correct answers. But Teachers from 3 to 9 I got minus values and unbelievable values. Then teachers 10 and 11 Excel gives answers for Serv1, Serv2, and J+F and serve to date correctly.
I do not get any answer in Access when dates are missing or in other words, leave is not taken.
The code I used in Access for
Service to date - =Int(DateDiff("yyyy",[Reg],[Lef1])+DateDiff("yyyy",[Rt1],[Lef2])+DateDiff("yyyy",[Rt2],Date())/365.25)
I used this code in a form field
I have been trying many ways to get various answers but as I said when dates are missing no answers are given in MS Access.
Can you please help me to solve this problem?
Thank you
Wilfred.
Dear all,
I am Wilfred Cooray from Sri Lanka, I found this forum while searching for a forum to get simple answers to problems. Hope I will be able to help you also.
My First problem with you is about Date calculation. The attachment is an Excel sheet that tries I am trying to describe the problem I have in Access 16.
This is about a Sunday school teachers (staff). Teachers are allowed to take leave for any valid reason like for examination, weddings, traveling abroad, etc. However, when calculating service total leave taken for more than 3 weeks at a stretch will not be counted when calculating the Service of the teachers. I am making a Database for Sunday school teachers with MS Access.
These codes are the fields in Access also.
Reg Registered date
Lef1 Left (date) to sit for an examination say (Part1)
Rtd1 Returned to school date
Lef2 Left to sit for the same (Part2) or another examination etc
Rtd2 Returned to school for the 2nd time.
Retd Retired Date.
Serv1 Service up to the 1st leave from Reg date.
Serv2 Service from the 1st Returned date (Rtd1) date to (Lef2) date
J+K Serv1+Serv2 (fields in Access for Service 1 and Service2)
Service to date taking Date() as a present date.
The last Column is Calculation Service to date assuming the teacher has not taken any leave.
In excel when fields from Lef1 to Rtd2 Not filled I got minus (-) values. In Access do not get any value at all. So, teachers, No 1 and 2 give correct answers. But Teachers from 3 to 9 I got minus values and unbelievable values. Then teachers 10 and 11 Excel gives answers for Serv1, Serv2, and J+F and serve to date correctly.
I do not get any answer in Access when dates are missing or in other words, leave is not taken.
The code I used in Access for
Service to date - =Int(DateDiff("yyyy",[Reg],[Lef1])+DateDiff("yyyy",[Rt1],[Lef2])+DateDiff("yyyy",[Rt2],Date())/365.25)
I used this code in a form field
I have been trying many ways to get various answers but as I said when dates are missing no answers are given in MS Access.
Can you please help me to solve this problem?
Thank you
Wilfred.