Automatic dates in query (1 Viewer)

stevenkeeble

New member
Local time
Yesterday, 20:09
Joined
Jun 12, 2015
Messages
8
I'm fairly new to access programming and cant work out if the following is possible. Read a few threads about automatic dates but non that really cover what i'm trying to do.

I have a table with tasks in which are allocated to specific staff members. The start date of the task is currently inputted by the user and then an estimated time frame is inputted which automatically enters the planned end date.

When a task is complete a Yes/No box is ticked so that these tasks don't show up on the current list anymore.

I wondered if it is possible, for the second task allocated to a certain person to have the start date automatically inputted depending on the planned end date of the precious task.

So if the planned end date was 12/06/2015 then the start date of the next would be 12/06/2015 and so on.

If this is possible any help would be appreciated!

Thanks
 

CJ_London

Super Moderator
Staff member
Local time
Today, 04:09
Joined
Feb 19, 2013
Messages
16,603
Assuming your form has a start date field and a 'numberofdays' field

you could set it up so that if the user enters a negative figure in the 'numberofdays' field you could put in the afterupdate event

If numberofdays<0 then startdate=datediff("d",numberofdays,startdate)
 
Last edited:

CJ_London

Super Moderator
Staff member
Local time
Today, 04:09
Joined
Feb 19, 2013
Messages
16,603
Short answer is it can be done if your tables are properly constructed.

you can do it with a query to find the last start date for that staff member plus the number of days for that record.

This assumes that all tasks are consecutive and do not have any gaps.

A more complete answer is not possible without knowing more about your table structure and business process - what happens if a staff member is ill or on holiday, or a task is moved from one person to another or they complete tasks ahead or behind schedule, etc
 

Users who are viewing this thread

Top Bottom