Hello
I have a problem in the sense that I have a query which currently is reliant on me entering the dates for it to run manually. There are two fields I enter in a table 'CurrentStart' and 'CurrentEnd' and I then link to this table in my main query.
What I want to do is automate this process so I have no manual input but i'm having no joy on how to do this.
What I have is a report which runs every monday and reports on the previous weeks data. An example would be if I ran the report on 21/07/2008 I would want my start range to be '14/07/2008' and my end range to be '20/07/2008 23:59'.
Also if the previous weeks falls into the previous month then I just want it to go as far back as 01st of the current month. An example being if I ran my report on 07/07/2008 my start srange would be '01/07/2008' and my end range would be '06/07/2008 23:59'.
Over all it needs to look at the last seven days unless it falls into the previous month where it only needs to go as far back as 01st of the month.
I was wondering if somebody could help me and give me some help on how to do this?
I have a problem in the sense that I have a query which currently is reliant on me entering the dates for it to run manually. There are two fields I enter in a table 'CurrentStart' and 'CurrentEnd' and I then link to this table in my main query.
What I want to do is automate this process so I have no manual input but i'm having no joy on how to do this.
What I have is a report which runs every monday and reports on the previous weeks data. An example would be if I ran the report on 21/07/2008 I would want my start range to be '14/07/2008' and my end range to be '20/07/2008 23:59'.
Also if the previous weeks falls into the previous month then I just want it to go as far back as 01st of the current month. An example being if I ran my report on 07/07/2008 my start srange would be '01/07/2008' and my end range would be '06/07/2008 23:59'.
Over all it needs to look at the last seven days unless it falls into the previous month where it only needs to go as far back as 01st of the month.
I was wondering if somebody could help me and give me some help on how to do this?