求助:我想在datagrid里面进行字段值的汇总,可总是死循环。
Private Sub Command4_Click()
On Error Resume Next
Dim total As Double
total = 0
Adodc1.Recordset.MoveFirst
While Not Adodc1.Recordset.EOF
total = total + Adodc1.Recordset.Fields("pay").Value
Adodc1.Recordset.MoveNext
Wend
Text1.Text = Str(total)
End Sub