Results 1 to 5 of 5
  1. #1
    nclemmons is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2015
    Posts
    2

    creating weekending date

    Hello,

    Using an event date, I would like to create a week of onset date using the weeks ending every Saturday (ex. EventDate = 01/03/2015, then WeekOnset = 1). I tried to use this code in the control source "=WeekendDate([EventOnset])" but all it does is return a "#Name?" in the WeekOnset field. Can anyone give me any tips?

    I tried to follow other posts about weekending date but I'm pretty much a beginner and couldn't get them to work at all.



    Thanks!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I'm not clear on what you want, but is it here?

    Date/Time expressions
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Where is the code for WeekendDate() ?

  4. #4
    nclemmons is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2015
    Posts
    2
    I was able to get it by using: Private Sub EventOnset_Click()
    WeekOnset = DatePart("ww", [EventOnset])
    End Sub
    Private Sub WeekOnset_Click()
    WeekOnset = DatePart("ww", [EventOnset])
    End Sub

    Thanks for responding. I'm looking forward to learning from this forum.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Glad you got it working, and welcome to the site!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Creating Last Run Date for Reports
    By housmand in forum Reports
    Replies: 17
    Last Post: 06-03-2014, 09:37 AM
  2. Creating a Date Range Form
    By daniejm in forum Forms
    Replies: 1
    Last Post: 12-13-2012, 08:51 AM
  3. Weekending Formulas
    By Huddle in forum Access
    Replies: 2
    Last Post: 07-02-2012, 01:36 PM
  4. Get the weekending date from today's date
    By Huddle in forum Access
    Replies: 10
    Last Post: 06-20-2012, 04:05 PM
  5. Creating A Table of Random Date
    By kimimaro_kiddo in forum Access
    Replies: 1
    Last Post: 01-01-2010, 10:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums