Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Aug 2001
    Location
    Boston, Massachusetts, USA
    Posts
    167
    Thanks
    1
    Thanked 0 Times in 0 Posts

    WeekdayName Function (Access 97)

    I am trying to get a function to work in my form. I have looked at several other posts and have tried different methods, all to no avail. I just want a text box to return the day of the week from another field on the form (Work Date). I have also tried to create another function to find the #day of the week to use as a middle translator between Work Date and the final function.

    =WeekdayName(Weekday([work date]),True) - returns #Name?
    OR
    =WeekdayName([#day of week],true) - returns #Name?

    =Weekday([Work Date]) - this one works fine

    Is there somewhere that I can establish the criteria? I'm not that sure of the expression builder. I am more comfortable in Excel and can do this there with no problem. I am just starting out with "beyond basic" Access. If there is an answer somewhere out there already and someone can point me to it, I will work with that.

    Thanks so much.
    Christine
    thanks
    christine

  2. #2
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: WeekdayName Function (Access 97)

    The WeekdayName function was introduced in VB/VBA 6.0 and therefore cannot be used in Access 97, which uses VBA 5.0 as its programming language. As workaround you can use Format function to return long or short weekday name, as illustrated (from Debug window):

    <pre>? Format(Date(),"dddd")
    Monday
    ? Format(Date(),"ddd")
    Mon</pre>

    HTH

Posting Permissions

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