Results 1 to 3 of 3

Thread: DATE Entry

  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Indiana
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DATE Entry

    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.

  2. #2
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Tennessee
    Posts
    194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DATE Entry

    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

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DATE Entry

    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.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •