Link to home
Start Free TrialLog in
Avatar of cansevin
cansevin

asked on

Querry for Current Week

I am using the following query to sum data for the current day. I need a separate query to sum data for the current week. Any idea how to modify this so it is Current Week?

SELECT 
    Sum(qryBookingRevenueTotals.SumofExtendedPrice) AS SumOfCountOfDAY, 
    "ADAY" AS DateSpec
FROM 
    qryBookingRevenueTotals
GROUP BY 
    DateValue(IIf(Not IsDate([qryBookingRevenueTotals].[DayRecorded]), '1/1/1950', [qryBookingRevenueTotals].[DayRecorded]))
HAVING 
    DateValue(IIf(Not IsDate([qryBookingRevenueTotals].[DayRecorded]), '1/1/1950', [qryBookingRevenueTotals].[DayRecorded])) = Date();

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cansevin
cansevin

ASKER

Thanks Gustav.. where do I put the Public Function?
You can open/create a module and copy/paste the functions. The goto menu and select Debug, Compile and Save.

/gustav