Due Date Calculation.

mbrande

New member
Local time
Yesterday, 19:33
Joined
May 10, 2006
Messages
7
I am trying to make it so it will automatically update and calculate the due date of a class from the last date the person took it. For instance...If someone has taken an annually class on 10 May 2006, I need for it to auto calculate when the next due date will be(One year from that date.) I would go in and input it all in myself, but I have about 1500 records I would have to do that with, and they all have different dates they took the class. Anyone know how I could do this...Thanks in advance.
 
mbrande said:
I am trying to make it so it will automatically update and calculate the due date of a class from the last date the person took it. For instance...If someone has taken an annually class on 10 May 2006, I need for it to auto calculate when the next due date will be(One year from that date.) I would go in and input it all in myself, but I have about 1500 records I would have to do that with, and they all have different dates they took the class. Anyone know how I could do this...Thanks in advance.


Here is code from my database. I had the same thing.

Code:
txtRunOutClaimsEndDate.Value = DateAdd("m", Nz(txtNumberRunOutMonths.Value, 0), txtEffectiveDate)

Use the dateAdd fuction to add either days, months or years. I did my in months, hence the 'm' in my code. I also use the NZ fuction that way it won't error out if a null value.

HTH.
 
selenau837 said:
Here is code from my database. I had the same thing.

Code:
txtRunOutClaimsEndDate.Value = DateAdd("m", Nz(txtNumberRunOutMonths.Value, 0), txtEffectiveDate)

Use the dateAdd fuction to add either days, months or years. I did my in months, hence the 'm' in my code. I also use the NZ fuction that way it won't error out if a null value.

HTH.

Thank you very much, I will try this and hopefully it will work for me. Ill let you know.
 
mbrande said:
Thank you very much, I will try this and hopefully it will work for me. Ill let you know.

Very welcome!

Post back what you did so that others can learn from your question.
 
selenau837 said:
Here is code from my database. I had the same thing.

Code:
txtRunOutClaimsEndDate.Value = DateAdd("m", Nz(txtNumberRunOutMonths.Value, 0), txtEffectiveDate)

Use the dateAdd fuction to add either days, months or years. I did my in months, hence the 'm' in my code. I also use the NZ fuction that way it won't error out if a null value.

HTH.

Ok this didnt work for me. I could just be doing it wrong or not putting it in the right place. If you dont mind could you put the code together for me with the information I provide you. I field name is ANTI-TERROR (Annually). And I need the due date to be one year from the date entered in this field. How would the code/expression look for this.

Again thank you.
 
mbrande said:
Ok this didnt work for me. I could just be doing it wrong or not putting it in the right place. If you dont mind could you put the code together for me with the information I provide you. I field name is ANTI-TERROR (Annually). And I need the due date to be one year from the date entered in this field. How would the code/expression look for this.

Again thank you.




= DateAdd("yyyy", 1, [Anti-Terror])

Try that, add that to the control source of your due date text box.
 

Users who are viewing this thread

Back
Top Bottom