using a rolling date range to sum

R

reluctantcoder

I want to use an update query to sum values of the previous twelve months. I
tried using
BETWEEN "#" & [date from] & "# AND #" & [date to] & "#"

in the criteria to limit records summed. I get a error message telling me I
did not include the and. I really would like to find a source that has the
explaination of each symbol and the parameters of the built in functions.

My dates are short date and time and always the first of the month. I have
several years of data that needs the rolling sum calculated so using a fixed
date would not work.

thanks in advance
 
M

Marshall Barton

reluctantcoder said:
I want to use an update query to sum values of the previous twelve months. I
tried using
BETWEEN "#" & [date from] & "# AND #" & [date to] & "#"

in the criteria to limit records summed. I get a error message telling me I
did not include the and. I really would like to find a source that has the
explaination of each symbol and the parameters of the built in functions.

My dates are short date and time and always the first of the month. I have
several years of data that needs the rolling sum calculated so using a fixed
date would not work.


The And is part of the Between operator so it must be
outside quotes:

BETWEEN "#" & [date from] & "#" AND "#" & [date to] & "#"
 

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