I search most of the threads but found no solution. Pelase help if you can
I have a data grid that only display certain records that match my criteria.
I need to add up one of the columns.
I did a loop and it sums up the entire tables. I just need to add the displayed records.
Thanks in advance
Dim dTotal As Double
Dim rsclone As ADODB.Recordset
Set rsclone = Adopurchase.Recordset.Clone
With rsclone
rsclone.MoveFirst
Do Until .EOF
If Not IsNull(.Fields("purproductqty"
) Then dTotal = dTotal + .Fields("purproductqty"
.Value
rsclone.MoveNext
Loop
Total.Text = dTotal
I have a data grid that only display certain records that match my criteria.
I need to add up one of the columns.
I did a loop and it sums up the entire tables. I just need to add the displayed records.
Thanks in advance
Dim dTotal As Double
Dim rsclone As ADODB.Recordset
Set rsclone = Adopurchase.Recordset.Clone
With rsclone
rsclone.MoveFirst
Do Until .EOF
If Not IsNull(.Fields("purproductqty"
rsclone.MoveNext
Loop
Total.Text = dTotal