Can anyone please help with what I am sure is actually a very simple
question.
In the charity, that I work for, I use a database which records the support
that we give to our clients. One of the fields in the database records the
start date of such support. I have a particular query that I wish to run
monthly so that it lists all the clients whose support started during the
previous month.
In the initial version of the query, I used the 'Between' and 'And'
functions to prompt me to enter the appropriate start and end dates.
However, I was sure that this could be automated and so, rather by trial and
error, I have now changed the date criteria to Between
DateSerial(Year (Date()),Month( Date())-1,1) And (Date()-Day(Date())).
This works ok at present but I realise that it will throw a wobbly when we
get to the January report. However, in any case, I expect there is a much
more elegant way to do what I am attempting. Can anyone offer any advice
please?
Thanks.
question.
In the charity, that I work for, I use a database which records the support
that we give to our clients. One of the fields in the database records the
start date of such support. I have a particular query that I wish to run
monthly so that it lists all the clients whose support started during the
previous month.
In the initial version of the query, I used the 'Between' and 'And'
functions to prompt me to enter the appropriate start and end dates.
However, I was sure that this could be automated and so, rather by trial and
error, I have now changed the date criteria to Between
DateSerial(Year (Date()),Month( Date())-1,1) And (Date()-Day(Date())).
This works ok at present but I realise that it will throw a wobbly when we
get to the January report. However, in any case, I expect there is a much
more elegant way to do what I am attempting. Can anyone offer any advice
please?
Thanks.
Comment