Groundrush
Registered User.
- Local time
- Today, 04:35
- Joined
- Apr 14, 2002
- Messages
- 1,376
Got a little system going whereby when a job is created it will display the date that the job is next due by.
I'm trying to work out how to create a qry that will display all due dates & not just the next one.
Here is how it should work.
If a job is created on the 1st of April 2007 & the type of job is MONTHLY then I want it to list the rest of the monthly orders that are planned for the year.
Here are the different PPM types that I'm using to calculate with
8784= Yearly
43848= 5 Yearly
2208= 3 Monthly
744= Monthly
168= Weekly
Has anyone done anything similar cause I can't see how it can be done?
This is what I'm using to create the next date due
Here is my qry that the above code is in.
This is the result.
Any suggestions will be welcomed
thanks
I'm trying to work out how to create a qry that will display all due dates & not just the next one.
Here is how it should work.
If a job is created on the 1st of April 2007 & the type of job is MONTHLY then I want it to list the rest of the monthly orders that are planned for the year.
Here are the different PPM types that I'm using to calculate with
8784= Yearly
43848= 5 Yearly
2208= 3 Monthly
744= Monthly
168= Weekly
Has anyone done anything similar cause I can't see how it can be done?
This is what I'm using to create the next date due
Code:
NextDue: DateAdd("h",DLookUp("[PPMNextDue]","[tblPPMType]","[tblPPMType]![PPMID]=" & [PPMID]),[DateReported])
Here is my qry that the above code is in.
Code:
SELECT tblPPMType.PPMID, tblBuildings.PropertyName, tblPPMType.PPMType, tblTasks.DateReported, tblPPMType.PPMNextDue, DateAdd("h",DLookUp("[PPMNextDue]","[tblPPMType]","[tblPPMType]![PPMID]=" & [PPMID]),[DateReported]) AS NextDue, tblContracts.ConDescription
FROM tblContracts INNER JOIN (tblBuildings INNER JOIN (tblPPMType INNER JOIN tblTasks ON tblPPMType.PPMType = tblTasks.JobDetails) ON tblBuildings.ProID = tblTasks.BuildingID) ON tblContracts.ContID = tblTasks.ContractNo
ORDER BY tblPPMType.PPMType;
This is the result.
DateReported--------- PPMNextDue-------- NextDue
14/03/2007 14:35:34---- 8784---- 14/03/2008 14:35:34
15/03/2007 15:08:00---- 8784---- 15/03/2008 15:08:00
15/03/2007 10:07:11---- 8784---- 15/03/2008 10:07:11
14/03/2007 14:52:56---- 2208---- 14/06/2007 14:52:56
15/03/2007 15:10:21---- 2208---- 15/06/2007 15:10:21
15/03/2007 10:19:35---- 43848---- 15/03/2012 10:19:35
14/03/2007 14:54:13---- 43848---- 14/03/2012 14:54:13
14/03/2007 14:55:15---- 4416---- 14/09/2007 14:55:15
15/03/2007 22:36:27---- 744---- 15/04/2007 22:36:27
14/03/2007 14:56:30---- 744---- 14/04/2007 14:56:30
15/03/2007 20:34:27---- 744---- 15/04/2007 20:34:27
18/03/2007 22:38:41---- 744---- 18/04/2007 22:38:41
15/03/2007 13:39:02---- 744---- 15/04/2007 13:39:02
15/03/2007 10:58:55---- 168---- 22/03/2007 10:58:55
14/03/2007 14:59:21---- 168---- 21/03/2007 14:59:21
Any suggestions will be welcomed
thanks
Last edited: