dates and datepicker question

Durien512

Registered User.
Local time
Today, 09:41
Joined
Dec 14, 2005
Messages
61
I cant figure this out...

i have a query that reports sales by week.. now on the date field in the query i have the following

<=[forms]![frmReportParameters]![DTPicker1] And >=DateAdd("d",-7,[forms]![frmReportParameters]![DTPicker1])

whick picks the date off a calendar on a form. Now this works 70% of the times. The issue is that "-7" because if i dont have sales every day of the week then it reports from the wrong week.

example;

if the week ends on friday and i run the report if i had sales every day that it reports sat-fri But if i had a day with no sales it will go one day further back so it reports fri-fri... the first friday belonging to the previous week??

anyone can tell me how to correct this?
thanks
 
never mind guys i figured it out..
there is nothing wrong with what i was doing except that i should use d-6 instead of -7
 

Users who are viewing this thread

Back
Top Bottom