Results 1 to 2 of 2

Thread: Date Problem

  1. #1
    Join Date
    May 2004
    Posts
    86

    Unanswered: Date Problem

    I have a form with soem feilds. One feild holds a date in the format of 20041231 Now i want a message box if this feilds is less than the current month. So its december now if any dat falls before december than i want a alert message box, Here is some code i tried but not working. DO i have to format some dates my formatt is 20041231


    If Text133 < Now() Then
    MsgBox "Please enter a value!", vbOKOnly, "Invalid Search Criterion!"
    End If

    thanks pete

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    no
    use the month(myVar) function to retrieve the month from the date variable MyVar

Posting Permissions

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