Build a query to pull current week data only.

D

Dmackcwby

I am trying to build a query that will pull data for the current week only.
I want the query to do this automatically without me having to input to and
from dates. I'm using this data to feed a report which in turn feeds another
report. How do I build the query to give me this information?
 
K

KARL DEWEY

Add a calculated field like this --
Format([YourDateField],"yyyymm")

Use this as criteria --
Format(Date(),"yyyymm")
 
J

John Spencer

Assumption:
Current week runs from Sunday to Saturday

WHERE SomeDateField >= DateAdd("d",1-Weekday(Date(),1),Date()) and
SomeDateField < DateAdd("d",1-Weekday(Date(),1),Date()) + 7
 
J

julostarr

I'm using Access 2003 and I'm trying to do this same senario (see below) of
pulling just the current week of data from Sunday to Saturday. I tried this
Function Formula in the first criteria row of the field that I am using for
filtering the data. I exchanged the "SomeDataField" for the actual field
name and left everything else the same, but it is returning all the data not
just the current week.

Is there something else that I need to fill in to make it work
 
L

Lord Kelvan

what did you actually put in the criteria copy and past it into here
for us to see

Regards
Kelvan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top