3 Replies Latest reply on Feb 21, 2014 1:42 PM by philmodjunk

    Inspection Date countdown issue...

    productionQC

      Title

      Inspection Date countdown issue...

      Post

           Hello-

           I have a field called "InspectionDate" that the user inputs the inspection date for a vehicle.  Once that date is input I have a field called "DaysToInspect".  Everything works great until you pass the inspection date.  Obviously the days to inspection go into a negative count, showing "-15 days" etc.  There are two things I need to accommodate.  The inspection month and day are the same every year, once the first date is sent.  If an inspection is missed I do need to flag it as missed.  But I also need the "DaysToInspect" to reset it's countdown to the following year.  As the days count down to 0 and passed I don't want -1,-2,-3, etc. I want 364, 363, 362.  What's the best approach for doing this?

            

           Thanks

            

        • 1. Re: Inspection Date countdown issue...
          philmodjunk

               I would think that you would want a new record for each time you inspect a vehicle. One table for the vehicles linked to a table of inspection records. That allows you to have a new due date for each inspection and when an inspection has  been made, a new inspection record would be made for the next annual inspection.

          • 2. Re: Inspection Date countdown issue...
            productionQC

                 Hi Phil-

                 Thanks for the quick response...  Seeing as the dates are the same every year I was hoping to avoid starting another table just for that.  It's more of a flag than a record.  We know they are being done, it's just a matter of giving the shop foreman the heads up of how many vehicle he may have for safety in any given month, allowing them to pull them off the road and change out the drivers.  Thus if possible I would like to take care of it in formula(s)

            • 3. Re: Inspection Date countdown issue...
              philmodjunk

                   But the dates aren't the same every year. The year changes each time. And if that value isn't changed, you can't readily compute your date count down.

                   And is there a field that records when or if the inspection was performed?

                   If ( DueDate > Get ( CurrentDate ) ; DueDate - Get ( CurrentDate ) )

                   Will keep from computing negative numbers and when you change the year value, the calc will reappear showing days to the next inspection date.