Impression

Fermé
Lenouveauapprenti Messages postés 300 Date d'inscription samedi 22 décembre 2018 Statut Membre Dernière intervention 7 avril 2024 - Modifié le 14 févr. 2019 à 10:12
Lenouveauapprenti Messages postés 300 Date d'inscription samedi 22 décembre 2018 Statut Membre Dernière intervention 7 avril 2024 - 16 févr. 2019 à 15:09
Bonjour,

Je me suis trouvé dans l'impasse.
Imprimer bulletin de paie par personne est bien réussi, mais lancer l'impression pour une serie de bulletins de paie de la période m'a bien cassé la tête sans la réussir.

Merci de m'orienter ou me donner la solution.


Configuration: Android / SamsungBrowser 8.2
A voir également:

4 réponses

f894009 Messages postés 17200 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 11 septembre 2024 1 708
14 févr. 2019 à 12:05
Bonjour,

Si possible, il nous faudrait votre projet VB6.0 car plus simple pour vous aidez..............!

Vos infos bulletins paie sont stockees ou??
0
Lenouveauapprenti Messages postés 300 Date d'inscription samedi 22 décembre 2018 Statut Membre Dernière intervention 7 avril 2024 2
14 févr. 2019 à 12:21
Bonjour

1 j'ai une tablePointage où je saisie le pointage de chaque jour

2 j'ai une tableQuinzaines où je stocke les cumuls de pointage pour chaque quinzaine.

En fait la tablePointage et la tablesQuinzaines contiennent les même valeurs. Seulement la première est détaillée par journèe, la deuxième rècapitule la quinzaine.

Pour imprimer les bulletins par nom ( impression individuelle ) j'appele les données de la tablePointage avec la requête SQL et la fonction sum(), et ça marche bien

Pour lancer l'impression de la série existante dans la quinzaine, j'appele les données de la tableQuinzaine en utilsant la boucle FOR NEXT , jusqu'à maintenant l'application, au lieu de le renvoyer les bulletins de toute la liste, elle me renvoie seulement le bulletin de la derniére personne sur la liste
0
f894009 Messages postés 17200 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 11 septembre 2024 1 708
14 févr. 2019 à 17:42
Re,

Certes, certes mais sans votre projet, je ne peux pas vous aider
0
Lenouveauapprenti Messages postés 300 Date d'inscription samedi 22 décembre 2018 Statut Membre Dernière intervention 7 avril 2024 2
14 févr. 2019 à 18:27
Re bonjour

Je vous remets les écritures écrite sur le bouton Imprimer,, je sais que c'est beaucoup de lignes, mais mon problème, je crois réside dans la boucle, peut être.

merci pour votre volonté.




Private Sub CdImpression_Click()


If CmbPeriode = "" Then
MsgBox "Désolé, vous devez sélectionner une quinzaine", vbCritical + vbInformation, "Info "
CmbPeriode.SetFocus
Exit Sub
End If




'Déterminer le nombre des bulletins à imprimer


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

NbreBulletins = RS.RecordCount

RS.Close







For I = 1 To NbreBulletins Step 1

SQLs = "select * from TableQuinzaines where ( (NOrdre=" & CInt(I) & ") and (Dossier='" & CStr(VarDossier) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic


If RS![NOrdre] = I Then

VarNomBulletin = RS![NomComplet]

End If
RS.Close



SQLs = "select * from TableInfos where ((Societe='" & CStr(VarSociete) & "')and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic


If RS![NomComplet] = VarNomBulletin Then

VarNomCompletB = RS![NomComplet]
VarMatriculeB = RS![Matricule]
VarDateEntreeB = RS![DateDebut]
VarDateNaissanceB = RS![DateNaissance]
VarCinB = RS![CIN]
VarCnssB = RS![Cnss]
VarAdresseOB = RS![Adresse]
VarSFB = RS![Statut]
VarNbreEnfantB = RS![NEnfant]
End If
RS.Close


If VarSFB = "VEUF(VE)" Then
VarSFB = "V"
ElseIf VarSFB = "DIVORCE(E)" Then
VarSFB = "D"
ElseIf VarSFB = "CELIBATAIRE" Then
VarStatutB = "C"
ElseIf VarSFB = "MARIE(E)" Then
VarSFB = "M"
End If




'______________________________

SQLs = "select * from TableAttributions where ((Societe='" & CStr(VarSociete) & "')and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic


If RS![NomComplet] = VarNomBulletin Then
VarNbreDeductionB = RS![NbreDeduction]
VarServiceB = RS![Service]
VarPosteB = RS![Poste]
VarModePaiementB = RS![ModePaiement]
VarSalBaseB = RS![SalaireBase]
End If
RS.Close



SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))" & "order by NOrdre asc"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarTauxAncB = RS![TauxAnciennete]
End If
RS.Close

VarTauxAncB = Format(VarTauxAncB, "#,##0.00")







'_____________________________________

'Détermination des valeurs

Dim VPxHs, VPcHs, NbreHN, MtChargeF, MaxChargeF As Double

SQLs = "select * from TableFraisProfessionnels where (Societe='" & CStr(VarSociete) & "')"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![Societe] = VarSociete Then
VPxHs = RS![PxHS]
VPcHs = RS![PcHS]
NbreHN = RS![HJr]
MtChargeF = RS![ChargeF]
MaxChargeF = RS![Max]
End If
RS.Close


'________________________________________________________________________________

'calcul du salaire de base (Prix unitaire H)

Dim VHSB, VHS1B, PxHFB, PxHRB, PxHTB As Double

'Heures Sup

If ((VPxHs <> 0) And (VPcHs = 0)) Then
VHSB = THS * VPxHs
ElseIf ((VPxHs = 0) And (VPcHs <> 0)) Then
VHS1B = VarSalBaseB / NbreHN
VHS1B = VHS1B * (1 + VPcHs)
End If


PxHFB = VarSalBaseB / NbreHN
PxHRB = VarSalBaseB / NbreHN
PxHTB = VarSalBaseB / NbreHN

'___________________________________________________________________________________________


'Déterminer le nombre des bulletions à traiter





'Heures normales

SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (Periode='" & CStr(CmbPeriode) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarHNB = Format(RS![Hn], "#,##0.00")
End If
RS.Close



SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (Periode='" & CStr(CmbPeriode) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarGainHNB = Format(RS![ValHN], "#,##0.00")
End If
RS.Close




'Heures suplémentaires

SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (Periode='" & CStr(CmbPeriode) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarHSB = Format(RS![Hs], "#,##0.00")
End If
RS.Close


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (Periode='" & CStr(CmbPeriode) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarGainSB = Format(RS![ValHS], "#,##0.00")
End If
RS.Close


'Heures fériées

SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (Periode='" & CStr(CmbPeriode) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarHFB = Format(RS![HF], "#,##0.00")
End If
RS.Close




SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (Periode='" & CStr(CmbPeriode) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarGainFB = Format(RS![ValHF], "#,##0.00")
End If
RS.Close


'Heures Récupération

SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (Periode='" & CStr(CmbPeriode) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarHRB = Format(RS![Hr], "#,##0.00")
End If
RS.Close

SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (Periode='" & CStr(CmbPeriode) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarGainRB = Format(RS![ValHR], "#,##0.00")
End If
RS.Close


'Heures à la tache

SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (Periode='" & CStr(CmbPeriode) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarHTB = Format(RS![HT], "#,##0.00")
End If
RS.Close


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (Periode='" & CStr(CmbPeriode) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarGainTB = Format(RS![ValHT], "#,##0.00")
End If
RS.Close



'____Calcul Somme sal brut

SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (Periode='" & CStr(CmbPeriode) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarTotalB = Format(RS![SalBrut], "#,##0.00")
End If
RS.Close

Dim GainTotal, TestGainT As Double


GainTotal = CDbl(VarGainHNB)
GainTotal = CDbl(GainTotal) + CDbl(VarGainSB)
GainTotal = CDbl(GainTotal) + CDbl(VarGainFB)
GainTotal = CDbl(GainTotal) + CDbl(VarGainRB)
GainTotal = CDbl(GainTotal) + CDbl(VarGainTB)


VarMtAncB = Format((CDbl(VarTotalB) - CDbl(GainTotal)), "#,##0.00")


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarSalNetB = Format(RS![SalNet], "#,##0.00")
End If
RS.Close


'Les arrondis

SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarArrondisB = Format(RS![Arrondis], "#,##0.00")
End If
RS.Close


'-----Les Cotisations


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarCotCnssPsB = Format(RS![CotCnss], "#,##0.00")
End If
RS.Close


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarCotAmoPsB = Format(RS![CotAmo], "#,##0.00")
End If
RS.Close

Dim VarCotB As Double



VarCotB = Format((CDbl(VarCotCnssPsB) + CDbl(VarCotAmoPsB)), "#,##0.00")











'Parts patronales

SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarCotCnssPpB = Format(RS![CotCnssPP], "#,##0.00")
End If
RS.Close


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarCotAmoPpB = Format(RS![CotAmoPP], "#,##0.00")
End If
RS.Close



SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarCotAFPpB = Format(RS![CotAFPP], "#,##0.00")
End If
RS.Close



SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarCotTFPPpB = Format(RS![CotTFPPP], "#,##0.00")
End If
RS.Close





Dim VarTotalCotPp As Double



VarTotalCotPp = Format((CDbl(VarCotCnssPpB) + CDbl(VarCotAmoPpB) + CDbl(VarCotAFPpB)), "#,##0.00")


'Les taux


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
TauxAFPp = Format(RS![TauxAFPp], "#,##0.00%")
End If
RS.Close


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
TauxAFPs = Format(RS![TauxAFPs], "#,##0.00%")
End If
RS.Close

'________________

SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
TauxCnssPp = Format(RS![TauxCnssPp], "#,##0.00%")
End If
RS.Close


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
TauxCnssPs = Format(RS![TauxCnssPs], "#,##0.00%")
End If
RS.Close

'_______________


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
TauxAmoPp = Format(RS![TauxAmoPp], "#,##0.00%")
End If
RS.Close


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
TauxAmoPs = Format(RS![TauxAmoPs], "#,##0.00%")
End If
RS.Close


'_____________________

SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
TauxTFPPp = Format(RS![TauxTFPPp], "#,##0.00%")
End If
RS.Close


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
TauxTFPPs = Format(RS![TauxTFPPs], "#,##0.00%")
End If
RS.Close







'Igr

SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarIgrB = Format(RS![Igr], "#,##0.00")
End If
RS.Close


SQLs = "select * from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "') and (Periode='" & CStr(CmbPeriode) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

If RS![NomComplet] = VarNomBulletin Then
VarArrondisB = Format(RS![Arrondis], "#,##0.00")
End If
RS.Close


'_Les cumuls


SQLs = "select sum(HN) from TableQuinzaines where ((Societe='" & CStr(VarSociete) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

VarCumulHNB = Format(RS.Fields(0), "#,##0.00")
La = Format(RS.Fields(0), "#,##0.00")
RS.Close



SQLs = "select sum(SalBrut) from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

VarCumulSalBrutB = Format(RS.Fields(0), "#,##0.00")

RS.Close


SQLs = "select sum(CotCnss) from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

VarCumulCotCnssB = Format(RS.Fields(0), "#,##0.00")
RS.Close


SQLs = "select sum(CotAmo) from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

VarCumulAmoB = Format(RS.Fields(0), "#,##0.00")
RS.Close


SQLs = "select sum(Igr) from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

VarCumulIgrB = Format(RS.Fields(0), "#,##0.00")
RS.Close


SQLs = "select sum(Arrondis) from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

VarCumulArrondisB = Format(RS.Fields(0), "#,##0.00")
RS.Close


SQLs = "select sum(SalNet) from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic


VarCumulSalNetB = Format(RS.Fields(0), "#,##0.00")
RS.Close



SQLs = "select sum(BaseImposable) from TableQuinzaines where ((Dossier='" & CStr(VarDossier) & "') and (NomComplet='" & CStr(VarNomBulletin) & "'))"

If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic

VarCumulSalImpB = Format(RS.Fields(0), "#,##0.00")
RS.Close

'_________________________________________

Dim Decomp, Var200, Var100, Var50, Var20, Var10, Var5, VAr2, VAr1 As Double

Var200 = VarSalNetB \ 200
Decomp = VarSalNetB - (Var200 * 200)

Var100 = Decomp \ 100
Decomp = Decomp - (Var100 * 100)

Var50 = Decomp \ 50
Decomp = Decomp - (Var50 * 50)

Var20 = Decomp \ 20
Decomp = Decomp - (Var20 * 20)

Var10 = Decomp \ 10
Decomp = Decomp - (Var10 * 10)

Var5 = Decomp \ 5
Decomp = Decomp - (Var5 * 5)

VAr2 = Decomp \ 2
Decomp = Decomp - (VAr2 * 2)

VAr1 = Decomp \ 1



Printer.NewPage
'___________________________________________________


On Error Resume Next


AdBulletin.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\InstMezAppSPointage\MezAppSPointage\BDAgafruit.mdb;Persist Security Info=False"

SQLs = "select * from TableQuinzaines where (Dossier='" & CStr(VarDossier) & "')"


AdBulletin.RecordSource = SQLs

Set DRBulletin.DataSource = AdBulletin

DRBulletin.Sections("Section4").Controls("LSte").Caption = VarSociete
DRBulletin.Sections("Section4").Controls("LAdresse").Caption = VarAdresseB
DRBulletin.Sections("Section4").Controls("LAffiliation").Caption = VarAffiliation
DRBulletin.Sections("Section4").Controls("LPeriode").Caption = VarPeriodeB
DRBulletin.Sections("Section4").Controls("lNomComplet").Caption = VarNomCompletB

DRBulletin.Sections("Section4").Controls("LService").Caption = VarServiceB
DRBulletin.Sections("Section4").Controls("LMatricule").Caption = VarMatriculeB
DRBulletin.Sections("Section4").Controls("LPOSTE").Caption = VarPosteB
DRBulletin.Sections("Section4").Controls("LCnss").Caption = VarCnssB
DRBulletin.Sections("Section4").Controls("LCin").Caption = VarCinB
DRBulletin.Sections("Section4").Controls("lAdresseO").Caption = VarAdresseOB

DRBulletin.Sections("Section4").Controls("LStatut").Caption = VarStatutB
DRBulletin.Sections("Section4").Controls("LNbreEnfant").Caption = VarNbreEnfantB
DRBulletin.Sections("Section4").Controls("LNbreDeduction").Caption = VarNbreDeductionB
DRBulletin.Sections("Section4").Controls("LDateNaissance").Caption = VarDateNaissanceB
DRBulletin.Sections("Section4").Controls("LDateEntree").Caption = VarDateEntreeB
DRBulletin.Sections("Section4").Controls("LModePaiement").Caption = VarModePaiementB

DRBulletin.Sections("Section2").Controls("LSalBase").Caption = Format(VarSalBaseB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LNbre").Caption = Format(VarHNB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LGain").Caption = Format(VarGainHNB, "#,##0.00")

DRBulletin.Sections("Section2").Controls("LPxHS").Caption = Format(VHS1B, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LHS").Caption = Format(VarHSB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LGainS").Caption = Format(VarGainSB, "#,##0.00")


DRBulletin.Sections("Section2").Controls("LPxHF").Caption = Format(PxHFB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LHF").Caption = Format(VarHFB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LGainF").Caption = Format(VarGainFB, "#,##0.00")


DRBulletin.Sections("Section2").Controls("LPxHR").Caption = Format(PxHRB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LHR").Caption = Format(VarHRB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LGainR").Caption = Format(VarGainRB, "#,##0.00")

DRBulletin.Sections("Section2").Controls("LPxHT").Caption = Format(PxHTB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LHT").Caption = Format(VarHTB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LGainT").Caption = Format(VarGainTB, "#,##0.00")

DRBulletin.Sections("Section2").Controls("LTotal").Caption = Format((VarTotalB), "#,##0.00")

DRBulletin.Sections("Section2").Controls("LAnc").Caption = Format(VarTauxAncB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LGainAnc").Caption = Format(VarMtAncB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LSalBrut").Caption = Format(VarTotalB, "#,##0.00")


DRBulletin.Sections("Section2").Controls("LCotCnss").Caption = Format(VarCotB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LCotAmo").Caption = Format(VarCotAmoB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LArrondis").Caption = Format(VarArrondisB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LIgr").Caption = Format(VarIgrB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LSalNet").Caption = Format(VarSalNetB, "#,##0.00")



DRBulletin.Sections("Section2").Controls("LTotalCotPS").Caption = Format(VarCotB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LTotalCotPP").Caption = Format(VarTotalCotPp, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LCotPS").Caption = Format(VarCotCnssPsB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LAmoPS").Caption = Format(VarCotAmoPsB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LCotPP").Caption = Format(VarCotCnssPpB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LAmoPP").Caption = Format(VarCotAmoPpB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LAFPP").Caption = Format(VarCotAFPpB, "#,##0.00")
DRBulletin.Sections("Section2").Controls("LTFPPP").Caption = Format(VarCotTFPPpB, "#,##0.00")


DRBulletin.Sections("Section2").Controls("LTauxCotPS").Caption = TauxCnssPs
DRBulletin.Sections("Section2").Controls("LTauxCotPP").Caption = TauxCnssPp
DRBulletin.Sections("Section2").Controls("LTauxAmoPS").Caption = TauxAmoPs
DRBulletin.Sections("Section2").Controls("LTauxAmoPP").Caption = TauxAmoPp
DRBulletin.Sections("Section2").Controls("LTauxAFPS").Caption = TauxAFPs
DRBulletin.Sections("Section2").Controls("LTauxAFPP").Caption = TauxAFPp
DRBulletin.Sections("Section2").Controls("LTauxTFPPS").Caption = TauxTFPPs
DRBulletin.Sections("Section2").Controls("LTauxTFPPP").Caption = TauxTFPPp


DRBulletin.Sections("Section5").Controls("LCumulHN").Caption = VarCumulHNB
DRBulletin.Sections("Section5").Controls("LCumulSalBrut").Caption = VarCumulSalBrutB
DRBulletin.Sections("Section5").Controls("LCumulCot").Caption = VarCumulCotCnssB
DRBulletin.Sections("Section5").Controls("LCumulAmo").Caption = VarCumulAmoB
DRBulletin.Sections("Section5").Controls("LCumulIgr").Caption = VarCumulIgrB
DRBulletin.Sections("Section5").Controls("LCumulArrondis").Caption = VarCumulArrondisB
DRBulletin.Sections("Section5").Controls("LCumulSalNet").Caption = VarCumulSalNetB
DRBulletin.Sections("Section5").Controls("LCumulSalImp").Caption = VarCumulSalImpB


DRBulletin.Sections("Section5").Controls("L200").Caption = Var200
DRBulletin.Sections("Section5").Controls("L100").Caption = Var100
DRBulletin.Sections("Section5").Controls("L50").Caption = Var50
DRBulletin.Sections("Section5").Controls("L20").Caption = Var20
DRBulletin.Sections("Section5").Controls("L10").Caption = Var10
DRBulletin.Sections("Section5").Controls("L5").Caption = Var5
DRBulletin.Sections("Section5").Controls("LDeux").Caption = VAr2
DRBulletin.Sections("Section5").Controls("LUn").Caption = VAr1



DRBulletin.Show
DRBulletin.WindowState = 2





If I = NbreBulletins Then
Exit For
End If



Next
'_______







End Sub
0
f894009 Messages postés 17200 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 11 septembre 2024 1 708
Modifié le 14 févr. 2019 à 20:34
Re,
Je récupère ce code et je regarde la chose
Vous avez mis des points d'arrêt pour faire quelques vérifications?
0
Lenouveauapprenti Messages postés 300 Date d'inscription samedi 22 décembre 2018 Statut Membre Dernière intervention 7 avril 2024 2
14 févr. 2019 à 20:23
Avec toute ma reconnaissance
0
Whismeril Messages postés 19144 Date d'inscription mardi 11 mars 2003 Statut Contributeur Dernière intervention 24 septembre 2024 919
14 févr. 2019 à 20:54
Bonjour

je me permets 2 petites interventions.
La première est sur l'utilisation du site, voir ceci https://codes-sources.commentcamarche.net/faq/11288-les-balises-de-code

La seconde est une réaction à
Je vérifie sans mettre des points d'arrêts
.
C'est une erreur, à part dans le cas où l'on teste un code qui ne doit pas être interrompu (traitement de flux...), l'utilisation de points d'arrêt et l'exécution en pas à pas est le meilleur moyen de débugger, de vérifier si l'exécution se comporte comme on le croit, sinon pourquoi (hypothèses sur le contenu des données erronées, algorithme inapproprié etc...)

0
Lenouveauapprenti Messages postés 300 Date d'inscription samedi 22 décembre 2018 Statut Membre Dernière intervention 7 avril 2024 2
14 févr. 2019 à 21:24
Merci pour la remarque.
Sincérement je ne sais pas encore comment me comporter avec ces fameux points d'atrêts.
0
Whismeril Messages postés 19144 Date d'inscription mardi 11 mars 2003 Statut Contributeur Dernière intervention 24 septembre 2024 919
14 févr. 2019 à 22:03
Voici un tuto avec Visual Studio https://openclassrooms.com/fr/courses/1526901-apprenez-a-developper-en-c/2867766-utilisez-le-debogueur

Evidement c'est pas en VB6, mais d'une part les tuto de 1999 (date à laquelle Microsoft a arrêté VB6) ne sont pas légion, et d'autres dans les grandes lignes c'était à peu prés pareil.
De mémoire l'observation des variables par survol de la souris n'existait pas, mais les espions et la fenêtre exécution oui.
0
Lenouveauapprenti Messages postés 300 Date d'inscription samedi 22 décembre 2018 Statut Membre Dernière intervention 7 avril 2024 2
Modifié le 14 févr. 2019 à 22:13
Je ne vous cache pas. Je n'ai aucune formation académuque en programmation, voire en informatique. Je tente de me former par un mixage entre la lecture, la pratique, et les aides que m'apportent ce forum, envers lequel je garde un grand estime.
En tout cas, merci pour vos conseils
0
f894009 Messages postés 17200 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 11 septembre 2024 1 708
Modifié le 15 févr. 2019 à 08:10
Bonjour Whismeril,

l'observation des variables par survol de la souris n'existait pas
Si…….

Lenouveauapprenti
De mon avis, 3/4 du code pourrait etre supprime si dans la table TableQuinzaines vous avez toutes les infos liees a NomComplet (vu le code il semblerait que oui)

Question:
_je suppose que la base est ouverte quand vous cliquer sur le bouton CdImpression!!
_si c'est le cas, pourquoi la reouvrir pour votre DRBulletin

Pour commencer, car n'ayant pas votre base, mettez le on error en commentaire
0
Lenouveauapprenti Messages postés 300 Date d'inscription samedi 22 décembre 2018 Statut Membre Dernière intervention 7 avril 2024 2
15 févr. 2019 à 08:17
Bonjour

la tableQuinzaines ne contient pas les données personnelles. C'est pourquoi j'appele la TableInfos et la TableAttributions.

Normalement quand je presse le bouton Impression, la base est supposée fermée.

Je vais essayer votre proposition
Merci
0
f894009 Messages postés 17200 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 11 septembre 2024 1 708
Modifié le 16 févr. 2019 à 07:02
Bonjour,

Ben oui, comme écrit précédemment , peux pas vous aider plus sans le projet et la base. Si vous acceptez , passez par la messagerie privée de CCM, je serai le seul a avoir accès a ces fichiers
Cote confidentialité , j'ai l'habitude.
Autrement désolé .................
Avez-vous mis de points d'arrêt pour contrôler le déroulement du code?
Les requetes c'est bien joli mais ne vous aidera pas.............
0
Lenouveauapprenti Messages postés 300 Date d'inscription samedi 22 décembre 2018 Statut Membre Dernière intervention 7 avril 2024 2
16 févr. 2019 à 07:58
Bonjour

Je veux bien mettre mon projet à votre disposition. Parceque mon but est d'apprendre en premier lieu. Seulement il y a des contraintes à dépasser, à celà .
1 vous devez m'orienter vers cette fameuse messagerie privée.
2 mon pc a un problélme avec la connexion. Une fois rétablie je t'enverrai le projet, sachant qu'il s'agissait d'un ancien projet ( d'apprentissage) inachevé que j'ai repris et que je corrige étape par étape.
0
Lenouveauapprenti Messages postés 300 Date d'inscription samedi 22 décembre 2018 Statut Membre Dernière intervention 7 avril 2024 2
16 févr. 2019 à 09:36
Re bonjour

Notez bien que le plus souvent je vous envoie mes messages à partir de mon télephone, vu les difficultés de connexion de mon pc ( ancien materiel)
A propos de mon probléme d'impression, j'aimerai partagé avec vous une observation.
Voilà j'ai ouvert l'icone d'une imprimante parametrée jadis, et j'trouvé tas de documents en file, j'ai suprimé tout, et j'ai lancé l'impression et j'ai trouvé le nombre de file en attente egale au nombre de bulletins à imprimer.
Me reste maintenant de connecter mon pc à une imprimante pour confirmer mes doutes
A votre avis, se peut il que mes manipulations seraient juste ?
0
f894009 Messages postés 17200 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 11 septembre 2024 1 708
16 févr. 2019 à 09:31
Re,
Clic sur mon pseudo, lui envoyer un message écrit en bleu en haut à droite
0
Lenouveauapprenti Messages postés 300 Date d'inscription samedi 22 décembre 2018 Statut Membre Dernière intervention 7 avril 2024 2
16 févr. 2019 à 15:09
Bonjour

Je crois, dans l'attente de le confirmer par une impression réelle, avoir trouvé l'astuce.

je vous remets ce que j'ai fais;


1 = avant la boucle j'ai déterminé les valeurs de N° d'ordre dans la TableQuinzaines des périodes (Quinzaines possibles) par la requête:


sqls="select * from TableQuinzaines where ((Dossier='"& cstr(VarDossier) &"') and (Periode='"& cstr(cmbPeriode) &"'))" & "order by NOrdre asc"


if rs![Periode]=cmbPeriode then

rs.MoveFirst
NOrdreDebut=rs![NOrdre]
end if
rs.close


sqls="select * from TableQuinzaines where ((Dossier='"& cstr(VarDossier) &"') and (Periode='"& cstr(cmbPeriode) &"'))" & "order by NOrdre asc"


if rs![Periode]=cmbPeriode then

rs.MoveLast
NOrdreFin=rs![NOrdre]
end if
rs.close


2 = J'ai mis à jour les valeurs de la boucle For Next, et fais une autre requête pour déterminer le nom de la personne equivalent au numéro d'ordre affecté à I.'




For I=NOrdreDebut to NOrdreFin Step 1

sqls="select * from TableQuinzaines where ((Dossier='"& cstr(VarDossier) &"') and (NOrdre="& CInt(NOrdreD) &"))


if rs![NOrdre]=NOrdreD then

VarNomBulletin=rs!NomComplet]

end if
rs.close


....
....
....
....



'Vers la fin de la boucle, j'ai posé la condition suivante

If I <= NOrdreBulletinF Then
DRBulletin.PrintReport False, rptRangeAllPages
GoTo Autre:
Exit Sub
ElseIf I > NOrdreBulletinF Then
Exit For
Exit Sub
End If


Autre:



Next



En usant de l'Imprimante (Microsoft XPS Document Writer) je constate que le total des files affiché correspond au nombre de lignes à imprimer

Une fois testé sur une imprimante périphérique, je vous tiendrai au courant

Merci pour votre attention
0