Date calculations in subform

S

SVE

Hello everyone,

I have a continuous subform called [Annual]. Each record has a [due date]
(to be calculated) and a [completion date] (entered manually). There is a
base field called [Intake Date]. I need the first record's [due date] to be
calculated as 45 days after the [Intake Date]. From the second record on, I
need the calculated [due date] to be 6 months after the previous record's
[completion date]. Here's an example of what the completed data and form
would look like:

Intake Date: 4/1/2006

Subform:
Due Date: 5/16/2006 (45 days after Intake Date) Completion Date:
5/18/2006
Due Date: 11/18/2007 (6 mos after Completion dt) Completion Date:
11/18/2007
Due Date: 5/18/2007 (6 mos after Completion dt) Completion Date:
5/20/2007
Due Date: 11/20/2007 (6 mos after Completion dt) Completion Date:
11/18/2007
Due Date: 5/18/2008 (6 mos after Completion dt) Completion Date:
5/22/2008
Due Date: 11/22/2008 (6 mos after Completion dt) Completion Date:
11/22/2008
etc.....

Can anyone tell me explicitly how to do this? I've only done minimal coding
so please be very detailed in your instructions.

Thank you in advance for all your help.
 
S

SVE

Thanks Dennis. Unfortunately it's more complicated than that. I know how to
add the number of days to a date, what I don't know how to do is the coding
for the references to the different fields. When I add the 6 months to the
Completion Date, is uses the completion date in that record, not theprevious
record and I have no idea how to have the initial record reference the Intake
Date. Can you help further please?

Thanks again for any and all input.

SVE

Dennis said:
Use the DateDiff function.

SVE said:
Hello everyone,

I have a continuous subform called [Annual]. Each record has a [due date]
(to be calculated) and a [completion date] (entered manually). There is a
base field called [Intake Date]. I need the first record's [due date] to be
calculated as 45 days after the [Intake Date]. From the second record on, I
need the calculated [due date] to be 6 months after the previous record's
[completion date]. Here's an example of what the completed data and form
would look like:

Intake Date: 4/1/2006

Subform:
Due Date: 5/16/2006 (45 days after Intake Date) Completion Date:
5/18/2006
Due Date: 11/18/2007 (6 mos after Completion dt) Completion Date:
11/18/2007
Due Date: 5/18/2007 (6 mos after Completion dt) Completion Date:
5/20/2007
Due Date: 11/20/2007 (6 mos after Completion dt) Completion Date:
11/18/2007
Due Date: 5/18/2008 (6 mos after Completion dt) Completion Date:
5/22/2008
Due Date: 11/22/2008 (6 mos after Completion dt) Completion Date:
11/22/2008
etc.....

Can anyone tell me explicitly how to do this? I've only done minimal coding
so please be very detailed in your instructions.

Thank you in advance for all your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top