How can I program the “Expired” check box to auto-activate if the “End Date” is in th

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • donkey
    New Member
    • Feb 2015
    • 2

    How can I program the “Expired” check box to auto-activate if the “End Date” is in th

    How can I program the “Expired” check box to auto-activate if the “End Date” is in the past relative to the current date
  • jforbes
    Recognized Expert Top Contributor
    • Aug 2014
    • 1107

    #2
    That kind of depends on how and when you want this to be triggered. When do you want this to happen? On the opening of a Form? On the creation of a Record? Part of a nightly automatic process?

    Comment

    • donkey
      New Member
      • Feb 2015
      • 2

      #3
      on an open form afterupdate with

      start date example 7/1/2014
      date expired 12/31/2014
      a check box

      How can I program the “Expired” check box to auto-activate if the “End Date” is in the past relative to the current date?

      Comment

      • jforbes
        Recognized Expert Top Contributor
        • Aug 2014
        • 1107

        #4
        Code:
        Private Sub txtdate1_AfterUpdate()
            Me.chkExpired.Value = (Me.txtdate1.Value < Me.txtdate2.Value)
        End Sub

        Comment

        Working...