Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Unanswered: Validation Rule/Text

    I used something like that in my Form_Open event

    Vacc_von.ValidationRule =
    "<= dateserial( Year(glb_stichtag),1,1)"

    Vacc_von.ValidationText = "Please Date between 1.1." & Year(glb_stichtag) & " and 31.01." & Year(glb_stichtag) + 1


    I become an error message wiht the glb_stichtag which is a global variable containing a given date


  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Again I found it
    it goes so:
    Vacc_von.ValidationRule = _
    "> Dateserial(" & Year(glb_stichtag) & _
    ",1,1) AND < DateSerial(" & Year(glb_stichtag) + 1 & ",1,31)"

    Vacc_von.ValidationText = _
    "Bitte Datumswert zwischen 1.1." & Year(glb_stichtag) & " und 31.01." & Year(glb_stichtag) + 1

    Thanks


Posting Permissions

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