Results 1 to 5 of 5
  1. #1
    sizemoreg is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2015
    Posts
    6

    Need help with a report from a query

    I'm trying to run a report based on a query, where my results will show the previous day. What need is to have the report show Friday's results, when I run the report on Monday.

    I need to set this up so that they people using this report (not tech savvy at all) can just click a button to run a macro for this query.

    I created the query to have a pop up window asking for the day, but as I said, the folks using this just don't get to the concept of just enter the day you want, so I am tasked with making this a dum as possible for them.



    I can get =date()-1 to work and grab results for the previous day

    I tried =networkdays()-1 with no success

    I'm not an access guru by any measure.

    could someone point in the right direction? This report is run daily, so I need it to capture the previous day and to capture Friday, when run on Monday

    Any help Thanks in advance

  2. #2
    bewsh1987 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2015
    Location
    UK
    Posts
    20
    hi Try this - IIf(Format(Date(),"dddd")="Monday",Date()-3,Date()-1)

  3. #3
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,421
    Would it matter if Monday was a holiday?

  4. #4
    bewsh1987 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2015
    Location
    UK
    Posts
    20
    Quote Originally Posted by Micron View Post
    Would it matter if Monday was a holiday?
    I agree you could have a secondary query for Monday holidays
    IIf(Format(Date(),"dddd")="tuesday",Date()-4,Date()-1)

  5. #5
    sizemoreg is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2015
    Posts
    6
    Worked, thank you so much

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

Similar Threads

  1. Replies: 3
    Last Post: 07-22-2014, 11:37 AM
  2. Replies: 1
    Last Post: 02-27-2014, 07:59 PM
  3. Replies: 3
    Last Post: 03-11-2013, 05:11 PM
  4. Replies: 1
    Last Post: 07-15-2011, 10:59 PM
  5. Replies: 3
    Last Post: 05-21-2010, 03:57 PM

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