Public Function FUN_TO_CHILDREN(STR_NUMBER_CARD As String) As Integer
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open "SELECT CLIENT_CARDS_TBL.* " _
& " From CLIENT_CARDS_TBL " _
& " Where (((CLIENT_CARDS_TBL.PARENT_CARD) = '" & STR_NUMBER_CARD & "')), GLB_CONNECTION, adOpenKeyset, adLockOptimistic"
rst.MoveFirst
Do While rst.EOF = False
GLB_GROUP_TURN = GLB_GROUP_TURN + FUN_PERSONAL_TURN( rst("NUMBER_CARD"))
STR_NUMBER_CARD = rst("NUMBER_CARD")
rst.MoveNext
Loop
rst.MoveFirst
Do While rst.EOF = False
GLB_GROUP_TURN = GLB_GROUP_TURN + FUN_PERSONAL_TURN( rst("NUMBER_CARD"))
STR_NUMBER_CARD = rst("NUMBER_CARD")
Fac (STR_NUMBER_CARD)
rst.MoveNext
Loop
rst.Close
Set rst = Nothing
End Function
|