Results 1 to 9 of 9
  1. #1
    MFS is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235

    Only Show Last 7 Days of data

    Hello all,
    I'm trying to have my query show only the last 7 days worth of data.
    Any help?
    I've tried Between Now() and Now()-7 But not working



    Mike

  2. #2
    Jester0001 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Location
    Indiana
    Posts
    69
    Where did you put the "BETWEEN Now() AND Now()-7"? When I put it in the criteria of the date field of my query, it works great by only showing data from the last week.

  3. #3
    MFS is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    Click image for larger version. 

Name:	Query.jpg 
Views:	15 
Size:	67.1 KB 
ID:	7036

    I'm entering it into the Criteria of my "Today" Field. Maybe it's do to another expression I have in another field. Attached is a copy of my query.
    This query is provideing a graph with equipment downtime data and I'm wanting it to show all downtime for the past 7 days.

  4. #4
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    under criteria of your date field in query:

    >= date() - 7

  5. #5
    MFS is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    >= date() - 7
    Sorry,

    Doesn't work either. I believe it is do to my expression in expr1: that is causing my problem??? Just not sure why.

  6. #6
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    you are placing this under [today]?
    does the query run well with no criterias in place?

  7. #7
    MFS is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    Yes the query runs perfect but shows years worth of data on the graph.
    Yes, putting under [today]

  8. #8
    mejia.j88 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    what error does it give you, or does it return an empty query?

  9. #9
    MFS is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235
    It would reply an empty Query, good news I finally got it to work using "Between Now() And Now()-7". Not sure why it works now and not all the multiple tries prior. Thank all of you though for your support.

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

Similar Threads

  1. Only Show Subreport with Data
    By jkirkman in forum Reports
    Replies: 11
    Last Post: 04-01-2012, 12:35 PM
  2. Getting Reports to show only certain data
    By CR08RTS in forum Reports
    Replies: 3
    Last Post: 03-03-2011, 05:43 AM
  3. Select Dates between days and two days ago?
    By rstonehouse in forum Queries
    Replies: 4
    Last Post: 08-18-2010, 02:13 AM
  4. how to show all data in this querey
    By grad2009 in forum Queries
    Replies: 3
    Last Post: 02-08-2010, 07:35 AM
  5. All Data wont show
    By Wrangler in forum Queries
    Replies: 1
    Last Post: 01-02-2006, 03:27 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