• DATE Entry

    Author
    Topic
    #354112

    Might as well make it two postings. I think VB has eaten my brain.

    I have three date fields on a corrective action style form. Dates 1 & 2 must be entered before date 3 can be. How can I restrict date 3, either OnEnter or some other property, to be disabled, or locked, until the other 2 fields contain date data? I tried various If IsNull functions but as I mentioned earlier I think my brain is dead. I also want to include an MsgBox error message indicating why the user cannot enter Date 3 because of Date 1 & 2 not being satisfied.

    As always I appreciate your assistance.

    Viewing 0 reply threads
    Author
    Replies
    • #519618

      why not make date three invisible until the other two are filled in

      if isnull date1 then
      date3.visible = false

      something like that
      HTH
      JerryC

      • #519642

        Iff you don’t want to hide date3, only restrict the ability to enter data, set up a routine called something like TestDates. In that routine, check to see if isdate(date) and isdate(date2). If either condition is false, set the focus to the empty date and disable date3. If both conditions are true, enable date3. Call the routine in the afterupdate events of date1 and date2 and the gotfocus event of date3.

    Viewing 0 reply threads
    Reply To: DATE Entry

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: