I am going to try to break this down - I am using the following code in a status footer section - I can't simply put the code in the field as there are multiple fields depending on the data output by the query - My code in the On Print event of the status footer is:
For intx = 3 To intcolumncount
If Me.Col1 = "rel to mkt" Then
Me("stat" + Format(intx)) = Me("col" + Format(intx))
End If
The problem that I have is there are three lines in the detail section under the status of "rel to mkt" (along with about 5 other status types) my code only returns the total of the last line that contains a status of "rel to mkt" - I am trying to return the total of all three boxes that contain "rel to mkt"
so the report detail looks like:
Status Result Qrt 1 Qrt2
declined not rel 10 12
In Und pending 15 11
On Hold pending 12 9
Rel To mkt Lost 9 7
Rel To mkt Pending 3 4
Rel To mkt Sold 8 3
My code results in totals of 8 and 3 - instead of totalling all "rel to mkt" (20 and 14)
Thanks for the help!!!
For intx = 3 To intcolumncount
If Me.Col1 = "rel to mkt" Then
Me("stat" + Format(intx)) = Me("col" + Format(intx))
End If
The problem that I have is there are three lines in the detail section under the status of "rel to mkt" (along with about 5 other status types) my code only returns the total of the last line that contains a status of "rel to mkt" - I am trying to return the total of all three boxes that contain "rel to mkt"
so the report detail looks like:
Status Result Qrt 1 Qrt2
declined not rel 10 12
In Und pending 15 11
On Hold pending 12 9
Rel To mkt Lost 9 7
Rel To mkt Pending 3 4
Rel To mkt Sold 8 3
My code results in totals of 8 and 3 - instead of totalling all "rel to mkt" (20 and 14)
Thanks for the help!!!