VB 6.0


( ) - 2


Next I

End Sub

Private Sub Cmd2_Click ( ) (2),

Dim St(1 To 4) As Single

Dim V! V

Dim I%, J%, F%, L%

V = 0

For L = 1 To 4 St

St(L) = 0

Next L

Data1.RecordSet.MoveFirst

1- Postavka

For I = 1 To

Data1.RecordSet.RecordCount Postavka

F=0

Data2.RecordSet.MoveFirst 1- Izd

For J = 1 To Data2.RecordSet.RecordCount

Izd

If Data2.RecordSet.Fields(1).Value=Data1.RecordSet.Fields(1).Value Then

For

L = 1 To 4

St(L)=St(L)+Data1.RecordSet.Fields(L+1).Value* _

Data2.RecordSet.Fields(2).Value

V = V + Data1.RecordSet.Fields(L+1).Value* _

Data2.RecordSet.Fields(3).Value

Next L

F=1 : Exit For

End If

Data2.RecordSet.MoveNext Izd

Next J

If F = 0 Then Lbl2.Caption = : Exit Sub