ник: nighina
Помогите найти ошибку!!! Почему для одних SP считает на 1 меньше, для других - правильно??
rcd1.MoveFirst
Do While rcd1.EOF() = False
k = IsNull(Left(rcd1!sp07, 5))
If k = False Then
ksp = Left(rcd1!sp07, 5)
shrsis = 0
shrab = 0
Do While Left(rcd1!sp07, 5) = ksp
If rcd1!CAT_STAFF = 4 Then
shrab = shrab + rcd1!KOLVO
End If
If rcd1!CAT_STAFF < 4 Then
shrsis = shrsis + rcd1!KOLVO
End If
rcd1.MoveNext
If rcd1.EOF() = True Then Exit Do
Loop
With rcd5
.AddNew
!sp07 = ksp & "0000"
rcd3.Seek "=", ksp & "0000"
If rcd3.NoMatch = False Then
!naim = rcd3!naim07
End If
!shrsis = shrsis
!shrab = shrab
.Update
End With
End If
If rcd1.EOF() = True Then Exit Do
rcd1.MoveNext
Loop
СПАСИБО ЗАРАНЕЕ