Results 1 to 2 of 2
  1. #1
    TheFuzzball is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2009

    How to validate dynamically generated text box

    Okay, here is the problem:
    I have two text boxes, DOB (Date of Birth) and Age.
    Age is not gotten from the table, instead it uses this formula in the Control Source: "=DateDiff("yyyy",[DOB],Date())" in order to calculate the age in years.
    This works beautifully, except I need to validate the Age box using "<=14 And >=19" but this validation is ignored because the information is generated dynamically.

    Can anyone please suggest a way of making this work, or possibly another way of approaching the problem.

    I don't have very much experience with Access, so please be gentle

  2. #2
    TheFuzzball is offline Novice
    Windows 7 Access 2007
    Join Date
    Oct 2009


    I used this formula: <=(DateAdd("yyyy",-14,Date())) And >=(DateAdd("yyyy",-19,Date())) to validate the date in the DOB cell directly.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. How to vertically align text inside a text box ?
    By alexcalgary in forum Forms
    Replies: 2
    Last Post: 10-06-2010, 08:44 AM
  2. From which query is the report generated
    By rukmal82 in forum Reports
    Replies: 6
    Last Post: 09-30-2009, 09:28 AM
  3. Replies: 1
    Last Post: 06-01-2009, 04:05 PM
  4. joining text in text boxes
    By jjwilliams73 in forum Forms
    Replies: 1
    Last Post: 08-26-2008, 02:30 PM
  5. Split text field into two text fields
    By Grant in forum Access
    Replies: 6
    Last Post: 01-31-2008, 05:52 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Other Forums: Microsoft Office Forums