• Day of Week Restriction

    Author
    Topic
    #1769039

    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!

    Viewing 1 reply thread
    Author
    Replies
    • #1781877

      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?

    • #1781879

      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.

    Viewing 1 reply thread
    Reply To: Day of Week Restriction

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: