Results 1 to 3 of 3
  1. #1
    carletonw
    Guest

    Day of Week Restriction

    Hi all,

    In Access 2K I'm developing a form that has an ActiveX calendar control bound to a date field called txtWkBegin. I want to restrict the end user to enter a date for Monday only, of any month of the year. I'm not aware of a VB function that does this. Any ideals? Thanks again!

    Carleton

    P.S. This group has been very very very helpful to me!

  2. #2
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Day of Week Restriction

    I have not done this, but there is a Weekday function that returns a whole number containing the day of the week. vbMonday = 2
    Might testing with that be useful?

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Day of Week Restriction

    What you're looking for will have to be done using the methods and properties of the ActiveX control itself. If you're just trying to make sure they only pick Mondays, you can test the value of the control in the appropriate event (i.e., DateClick if that's a valid event of that particular control) using the Weekday function. If it isn't Monday, you could either notify the user or figure out which date would be a Monday and change the value to that date.
    Charlotte

Posting Permissions

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