1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| Public Sub ModifIMC()
AddMess ("ModifIMC")
Dim cM As String
Dim sT As String
Dim RecSet As ADODB.Recordset
Set RecSet = New ADODB.Recordset
RecSet.Open "ImportIMC", CurrentProject.Connection, adOpenDynamic, adLockOptimistic
Do
If RecSet!NumContrat = "Marché" Then
cM = RecSet!CodeMarche
End If
If RecSet!Statut = "SAIN" Or RecSet!Statut = "DOUTEUX" Then
sT = RecSet!Statut
End If
If IsNumeric(RecSet!NumContrat) Then
RecSet!CodeMarche = cM
RecSet!Statut = sT
RecSet!NbJourImpaye = CInt(CDate(JourDebut & "/" & MoisDebut & "/" & AnneeDebut) - CDate(RecSet!DateDebutImpaye))
RecSet!Solde = CDbl(RecSet!crd) + CDbl(RecSet!MontantImpaye)
RecSet.Update
End If
RecSet.MoveNext
Loop Until RecSet.EOF
RecSet.Close
Set RecSet = Nothing
End Sub |
Partager