Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Posts
    5

    Smile Unanswered: Date Validation!!!!

    I would really appreciate some ideas. I have to create a validation rule that says that no date of birth after today's date can be entered. It is a hospital database that I am building, and newborns with today's DOB are OK, but babies due tomorrow or in the future can not be entered.

    Thanks, Janie

  2. #2
    Join Date
    Apr 2004
    Location
    Sydney Australia
    Posts
    369
    Try

    <=Date()

  3. #3
    Join Date
    May 2004
    Posts
    27
    Quote Originally Posted by janie1
    I would really appreciate some ideas. I have to create a validation rule that says that no date of birth after today's date can be entered. It is a hospital database that I am building, and newborns with today's DOB are OK, but babies due tomorrow or in the future can not be entered.

    Thanks, Janie

    Janie ..you want to chkout the "DateDiff" function for vb
    theyre self explanatory
    you can put the code in a module for access

  4. #4
    Join Date
    May 2004
    Posts
    16

    Wink date validation

    a simple way to achieve this might be to set the forms text box that you use to update the table to: on update- runmacro (checkdate)

    in the macro right

    condition: - [date fiels]>date()
    action: msgbox invalid date

    condition: - [date field]>date()
    action: setvalue, [date field] = ""

    this will reset the dat to "" and prompt the user to re-enter a valid date

    hope this helps


    andy

Posting Permissions

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