Consulting

Results 1 to 3 of 3

Thread: DATE VALIDATION IN TEXTBOX

  1. #1
    VBAX Regular
    Joined
    Nov 2018
    Location
    London, U.K.
    Posts
    99
    Location

    DATE VALIDATION IN TEXTBOX

    I cannot find any code examples or references that I can use to ensure that a year value users input into a text box is:

    (a) in the correct format "YYYY" and
    (b) not greater than the current year.

    Any advice would be appreciated.

  2. #2
    VBAX Mentor
    Joined
    Apr 2009
    Location
    Kingsbury
    Posts
    423
    Location
    example:Me.TxtDDRYR.Text = Format(Now, "YYYY")
    best to put in after update, this will check it straight away
    Rob

  3. #3
    VBAX Regular
    Joined
    Nov 2018
    Location
    London, U.K.
    Posts
    99
    Location
    Thanks Rob!

Posting Permissions

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