Create Popup Reminder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tasawer
    New Member
    • Aug 2009
    • 106

    Create Popup Reminder

    Hi,
    I have a popup reminder to list all vehicles due for service within the next two weeks.

    To calculate the next service date, I am using (SQL)MAX of MaintCompDate and the following fields:
    MaintenaceDate (date maintenance Started)
    MaintCompDate (date maintenance Completed)
    MaintenanceComp letedYN
    ServiceRemindYN

    Once I put the vehicle into service, it is not dropping out of the reminder list becuase MaintCompDate is null and SQL is picking up the last MainCompDate.

    How can I work my way round this Please.

    Regards
  • gnawoncents
    New Member
    • May 2010
    • 214

    #2
    It sounds like you want to use the MaintenanceDate as your criteria for generating the popup as opposed to the MaintCompDate.

    Please provide more detail and a sample of your code and I can be more specific. Thanks.

    Comment

    • tasawer
      New Member
      • Aug 2009
      • 106

      #3
      Originally posted by gnawoncents
      It sounds like you want to use the MaintenanceDate as your criteria for generating the popup as opposed to the MaintCompDate.

      Please provide more detail and a sample of your code and I can be more specific. Thanks.
      Thanks for your suggestion.
      I have got it resolved working on the assumption that vehicle is constantly hired.
      What I did was to look at the max MaintenanceDate
      Then look at it again where Maintenace is completed
      and compared the two.
      if they match, vehicle is out on the road and needs service, if they don't then vehicle is being serviced.

      of course, this will not work for the vehicle that is serviced and left on the forcourt waiting to be hired.

      I suppose, i'll have to add another date field, (HIREDATE) and use this as the alternative?

      what do you suggest?

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32661

        #4
        Originally posted by gnawoncents
        gnawoncents: Please provide more detail and a sample of your code and I can be more specific. Thanks.
        I think you already have a suggestion that you have not responded to yet. It would also be my suggestion, so let's repeat it here and see where we can get to :

        Please provide more detail as to the logic you are intending to implement.

        So far, we only know that you have 4 fields and you seem to want to do a Max() of those fields (which doesn't make much sense as 2 of them are boolean values).

        If you can provide the whole question clearly, I'm sure either of us would be happy to help you.
        Last edited by NeoPa; Jun 10 '10, 11:25 AM. Reason: Reset from Best Answer - Assumtion being that it was set by accident.

        Comment

        • tasawer
          New Member
          • Aug 2009
          • 106

          #5
          Hi, Sorry for the delay in replying. I was working on other areas of the program.

          By using MaintenaceDate, as suggested by gnawoncents, I have managed to create the popup as required.

          Thanks for your help.

          Regards

          Comment

          • gnawoncents
            New Member
            • May 2010
            • 214

            #6
            Glad to hear it's working for you.

            Comment

            Working...