Results 1 to 3 of 3

Thread: Strange Validation Problem

  1. #1

    Thread Starter
    Addicted Member señorbadger's Avatar
    Join Date
    Oct 2003
    Location
    Mud pools of wellingborough
    Posts
    193

    Question Strange Validation Problem

    VB Code:
    1. Dim yr, mn
    2. yr = Year(Date)
    3. mn = Month(Date)
    4.        If Not cmbyear.Text = yr Then Exit Sub
    5.        If Val(cmbmonth.Text) < mn Then MsgBox "Incorrect date"

    Hey all the code above should make sure
    that the date is only validated if it is equal to this year

    If this is the case then it will only display a message if the month is equal or greater to the current

    Please help ASAP

  2. #2

  3. #3

    Thread Starter
    Addicted Member señorbadger's Avatar
    Join Date
    Oct 2003
    Location
    Mud pools of wellingborough
    Posts
    193
    Ya thanks it works now the month was JAN i forgot to convert to 01

    Thanks people

Posting Permissions

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



Click Here to Expand Forum to Full Width