Question Due Date Calculation

superblades

New member
Local time
Today, 06:18
Joined
Sep 20, 2006
Messages
9
Hi,

Wonder if anyone can shed any light to be able to help me, i've tried various forums and googling and not got very far...

I have a table which is called 'MasterTasks' essentially there are approx 12 columns and two of the columns are a 'Start Date' and 'Due Date'. Each row is an individual task.

Some of the tasks have Due Dates, some dont, so for instance if Task 1 has a due date of 28 days after the Start Date, how would i get Access to automatically create this for me?

I've looked at DateAdd but i cant seem to get it to work :(

Any advice?

Many thanks

Superblades
 
I've looked at DateAdd but i cant seem to get it to work

More than looking is required. Google some examples for usage of DateAdd, grab one, make it fit your case, and if that fails, post what you have written and the exact error message (or discrepancy from what you expected) here.
 
Some of the tasks have Due Dates, some dont, so for instance if Task 1 has a due date of 28 days after the Start Date

Do you mean some tasks will always have blank Due Dates? Or do you mean some tasks don't have set formulas for determining their due dates and the user supplies those?

If, all tasks that have due dates are calculable and not changeable by the user, then you wouldn't store it at all. You would use a query to determine it.

If its a mismatch where some are calculatable and some are user supplied, then you would create a form and use an event (AfterUpdate) on the STart Date field and when the user supplied/changed that it would fire some VBA to determine the due date using the DateAdd function.

Again, though, are all tasks that have due date calculable?
 
Do you mean some tasks will always have blank Due Dates? Or do you mean some tasks don't have set formulas for determining their due dates and the user supplies those?

The Due Date is essentially a calculated field, however some tasks dont have a set time to be delivered so in effect they will always have a blank due date if that makes sense?

Cheers

Brendan
 
Then I wouldn't store the Due Date. Instead, when I needed it I would calculate it.

This will require another table:

TaskTimeFrames
Task, DaysToComplete
1, 28
2, 14
...

So that means Task 1s' due dates are 28 days after they start, Task 2s' due dates are 14 days after they start. With that table and a start date you can then use DateAdd to determine the exact date for each.
 

Users who are viewing this thread

Back
Top Bottom