fiogf49gjkf0d I'm using the GetSummary Function on a datagrid and the summary part works great, the problem is that i'm only able to see the first row of the datagrid. None of the other rows appears.
Here is the code i'm using to get the totals i need:
If Column.FieldName = "A2_TOTALPAYMENTS" Or Column.FieldName = "SO_TOTAL" Or Column.FieldName = "TOTAL_TAX" Or Column.FieldName = "SUB_TOTAL" Then Dim rs, amnt amnt = 0 Set rs = Sender.RecordSet If rs.RecordCount > 0 Then rs.MoveFirst While Not rs.EOF If IsNull(rs.Fields("UN_CANCELED_BYID").Value) Then If Not IsNull(rs.Fields(Column.FieldName).Value) Then amnt = amnt + CDbl(rs.Fields(Column.FieldName).Value) End If End If rs.MoveNext Wend End If Set rs = Nothing Value = amnt End If
If i take out the looping then all the rows show up, but the only way to get what i need without doing another call to the database is to loop through the recordset.
Any thoughts would be appreciated. |