D
doyle60
I have a query that has six key fields (Style, Color_Code, Lbl_Code,
Dimension, Size, and Year) and 12 months (Feb, Mar, Apr, May, Jun,
Jul, Aug, Sep, Oct, Nov, Dec, Jan). January is the last month of the
year, so January in the 2008 record is really Jan 2009. The query is
for users to enter Sales Projections.
Anyway, how do I get a query to return the months all on the same
record (not separating between years) with the current month being
named 1 and the months after being named 2, 3, 4, 5, 6, and so on?
For the months before the current month, I would want to return 0, -1,
-2, -3, -4 and so on down.
Hence, if I ran the query today, I would want to see:
Aug: -1
Sep: 0
Oct: 1
Nov: 2
Dec: 3
Jan: 4
Feb: 5
Mar: 6
etc.
I will be using these renamed column names in computations as well.
That is, I may want to add together columns that are greater than X
but lower than Y. That is why I am going with numeric column names
even though they are hard to deal with. Is that wise? I have a lot
of experience with queries but never referred to the column names
formulaicly. If it would be best to name the columns beginning with
letters anyway, please advise. I could name them M01, M02, M03 and
for the negatives MN00, MN01, MN02, etc. (I do not have to worry
about going over a hundred months, I will probably filter out years
that are two years old or two years in the future anyway.)
Thanks,
Matt
Dimension, Size, and Year) and 12 months (Feb, Mar, Apr, May, Jun,
Jul, Aug, Sep, Oct, Nov, Dec, Jan). January is the last month of the
year, so January in the 2008 record is really Jan 2009. The query is
for users to enter Sales Projections.
Anyway, how do I get a query to return the months all on the same
record (not separating between years) with the current month being
named 1 and the months after being named 2, 3, 4, 5, 6, and so on?
For the months before the current month, I would want to return 0, -1,
-2, -3, -4 and so on down.
Hence, if I ran the query today, I would want to see:
Aug: -1
Sep: 0
Oct: 1
Nov: 2
Dec: 3
Jan: 4
Feb: 5
Mar: 6
etc.
I will be using these renamed column names in computations as well.
That is, I may want to add together columns that are greater than X
but lower than Y. That is why I am going with numeric column names
even though they are hard to deal with. Is that wise? I have a lot
of experience with queries but never referred to the column names
formulaicly. If it would be best to name the columns beginning with
letters anyway, please advise. I could name them M01, M02, M03 and
for the negatives MN00, MN01, MN02, etc. (I do not have to worry
about going over a hundred months, I will probably filter out years
that are two years old or two years in the future anyway.)
Thanks,
Matt