Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with progressive date calculations

Status
Not open for further replies.

Phideaux

Technical User
May 1, 2003
51
0
0
US
I’ve been working on a query problem for several weeks and I’ve kept hitting a rock wall. HELP!!

I have a preventative maintenance (P/M) program that calculates the number of days from the start date and generates a P/M work order. All of this works smoothly.

My fields are:
[start date] + [numberdaysuntildueagain] = [date due]

I then use [due date] to notify me and generate the needed work order. This works to generate 1 W/O when the P/M first comes due. However, as long as the W/O is not done and the [start date] field is not updated to a new date that the item was done, only 1 W/O is opened for the item.

I need to continue to generate P/M work orders for this item each time that the [numberdaysuntildueagain] comes around.

Example:
[start date]+ [Numberdaysuintildueagain]= [due date]
[01/01/2006]+ [ 15 ] = [01/15/2006]

Each time that 15 days pass from the 01/01/2006 a new item needs to be generated in the query so that a additional W/O's can be made, because the original was not completed.
in this case
Due dates would be: 01/15/2006 - 01/30/2006 and so on.
i don't want to see projected due dates. I only need to see them if the date is passed by.

I’ve tried to do this using a table to write the due W/O’s to and I can see that it would become quiet large in a short time. Any ideas on how to do this would be greatly appreciated.

Thanks for giving this a read! Thanks in advance.


Phideaux

The mind is the best toy.
Play with someone else's often
 
Ther woiuld seem to be a coulpe of items necessary which are not discussed. First, there must be an indicator that the (each) issued work order is complete (mayhap a date somplete?). This, in turn suggests that the workorders also need to be tracked, as having some unique indicator (ID), hte issued date and of course the date (successfully?) completed,. Then, check the table for this being filled in, along with the original issue date. If the original is not complete within the time frame allocated (15 days), simply issue a new work order and cancelling hte previous one for the task (possibly by simply entering a phony completion date, like 12/30/1899?



MichaelRed


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top