Ado
Ado
-------
, 11:15 AM
��� ����� ��� �������� �� ���� ���� adodc
Adodc1.Recordset.Filter = " date >= #" & text1.text & "# and date <= #" &
text2.text & "# "
------------------
Private Sub Get_dblSum()
Dim dblSum As Double
Me.Adodc1.Recordset.MoveFirst
Do While Not Me.Adodc1.Recordset.EOF
dblSum = dblSum + Me.Adodc1.Recordset.Fields(2)
Me.Adodc1.Recordset.MoveNext
Loop
MsgBox "Total: " & dblSum
Me.Adodc1.Recordset.MoveFirst
End Sub
------------
Dim i As Integer
Dim sum As Double
For i = 0 To RS.RecordCount - 1
sum= sum + CDbl(DataGrid1.Columns(1).Text)
RS.MoveNext
Next i
Label1.Caption = sum
----------
list view
--
Private Sub Get_Col_Total()
Dim L_Index As Long
Dim Total_Sum As Long
Label_Total = Total_Sum
End Sub
������ : .SubItems(1) �� ��� ������ ������ ����� ������� ��� - ����� ������ ���
��� ������ �������
------------------*-
Private Sub Data_Get()
On Error Resume Next ': Err.Clear
Adodc1.CommandType = adCmdText
Adodc1.Refres
Call Get_Col_Total
End Sub