S
scorpion53061
Hi
I think I am on the right track here but unsure......
I need to:
1. find all like items in the ITEMNO column in the dataset called "RESULTS"
2. in the column called "DATE" (called DATE with a smalldatetime value -
example it might say 1/2/2002) of the dataset "RESULTS" add up all the
transactions that occured in the month of January for this item (see #1) and
add them together and assign them to the variable called "Jan" which has a
decimal value.
What I have:
Dim itemcheck as Integer
For itemcheck = 0 to dstran1.Tables(0).Rows.Count - 1
drnew.Item("JAN") = dstrancopy.Tables(0).Select("ITEM = " &
dstrancopy.Tables(0).Rows(itemcheck).Item("ITEM") & " and " & Format("DATE =
" & dstrancopy.Tables(0).Rows(itemcheck).Item("DATE"), "MMM") & " = JAN"
.....problem of adding the column TOTAL together for these selected items)
etc for months 2- 12
--------
What I am missing: (assuming this is right):
I have to somehow add all the columns of the "TOTAL" for these like items
which is the real value we are after in January.
Any help is appreciated.......
I think I am on the right track here but unsure......
I need to:
1. find all like items in the ITEMNO column in the dataset called "RESULTS"
2. in the column called "DATE" (called DATE with a smalldatetime value -
example it might say 1/2/2002) of the dataset "RESULTS" add up all the
transactions that occured in the month of January for this item (see #1) and
add them together and assign them to the variable called "Jan" which has a
decimal value.
What I have:
Dim itemcheck as Integer
For itemcheck = 0 to dstran1.Tables(0).Rows.Count - 1
drnew.Item("JAN") = dstrancopy.Tables(0).Select("ITEM = " &
dstrancopy.Tables(0).Rows(itemcheck).Item("ITEM") & " and " & Format("DATE =
" & dstrancopy.Tables(0).Rows(itemcheck).Item("DATE"), "MMM") & " = JAN"
.....problem of adding the column TOTAL together for these selected items)
etc for months 2- 12
--------
What I am missing: (assuming this is right):
I have to somehow add all the columns of the "TOTAL" for these like items
which is the real value we are after in January.
Any help is appreciated.......