Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DT Picker - How to read back the Day (AXP)

    Hi everybody,
    I have a form with a DT picker control. I can use the date function for some other things but I need to return the Day of the week from the control as well. In other words, I select 15-Sep-2002 from the drop down calendar. I get the date returned and use it for other things. I also need to make sure that the user has selected a Sunday. Does anyone know how I can do this?

    Thanks,
    Mark

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: DT Picker - How to read back the Day (AXP)

    Access 97 help shows:

    This example uses the Weekday function to obtain the day of the week from a specified date.

    Dim MyDate, MyWeekDay
    MyDate = #February 12, 1969# ' Assign a date.
    MyWeekDay = Weekday(MyDate) ' MyWeekDay contains 4 because
    ' MyDate represents a Wednesday.

    To test for a Sunday just test Weekday(MyDate) = vbSunday

    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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