A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Previous Dates



 
 
Thread Tools Display Modes
  #1  
Old November 26th, 2009, 04:16 PM posted to microsoft.public.access.queries
Peter
external usenet poster
 
Posts: 962
Default Previous Dates

Hi all, i am ashamed to admit that i can not figure this one out..

In one table i have the DateCreated field. In my query i want to display all
records created today, Date() and during the previous two days. If today is
Thursday i also want to see the records created Tuesday and Wednesday and
today..

I am trying this -2!=Date() but it fails..

Any ideas?

Thanks!

  #2  
Old November 26th, 2009, 04:59 PM posted to microsoft.public.access.queries
vanderghast
external usenet poster
 
Posts: 593
Default Previous Dates

Date( ) + 1 AND = Date( ) - 2


should do, in the grid., as criteria.



Vanderghast, Access MVP



"Peter" wrote in message
...
Hi all, i am ashamed to admit that i can not figure this one out..

In one table i have the DateCreated field. In my query i want to display
all
records created today, Date() and during the previous two days. If today
is
Thursday i also want to see the records created Tuesday and Wednesday and
today..

I am trying this -2!=Date() but it fails..

Any ideas?

Thanks!


  #3  
Old November 26th, 2009, 05:31 PM posted to microsoft.public.access.queries
Peter
external usenet poster
 
Posts: 962
Default Previous Dates

Thank you very much! Indeed it works perfect!

"vanderghast" wrote:

Date( ) + 1 AND = Date( ) - 2


should do, in the grid., as criteria.



Vanderghast, Access MVP



"Peter" wrote in message
...
Hi all, i am ashamed to admit that i can not figure this one out..

In one table i have the DateCreated field. In my query i want to display
all
records created today, Date() and during the previous two days. If today
is
Thursday i also want to see the records created Tuesday and Wednesday and
today..

I am trying this -2!=Date() but it fails..

Any ideas?

Thanks!


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:58 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.