Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005

    Unanswered: Validate date in text box

    This forum has been the most helpful one I have been on. I just want a user to be able to enter a date in a text box that is only in the future. For instance: If it is 11-17-2005, I don't want them to enter anything before 11-17 or they will get a message. I've tried a few codes but maybe I am not doing them right.


  2. #2
    Join Date
    Nov 2003
    Place code something like this into the Before Update event for your Date entry field:

    If Me.myTDateTxtBoxName < CDate(Now()) Then 
       MsgBox "Your date entry is invalid. You must supply a date in the future.",vbExclamation, "Invalid Date Entry"
       Cancel = True
    End If
    Self Taught In ALL Environments.....And It Shows!

Posting Permissions

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