cs_petchy
Messages postés710Date d'inscriptionjeudi 20 février 2003StatutMembreDernière intervention19 mai 2015
-
15 févr. 2009 à 22:03
cs_petchy
Messages postés710Date d'inscriptionjeudi 20 février 2003StatutMembreDernière intervention19 mai 2015
-
16 févr. 2009 à 09:57
bonsoir
dans une listview j'ai 4 colonnes
Désignation Nbrs taux/h ttc
mais se qui est bizarre ,quand dans la colonne "Désignation" j'ai un texte de plus de 50 caracteres et quand je click sur cmd_sauv,rien ne se passe
par contre un texte de moins de 50 caractères,pas de probleme la facture est bien sauvegarder
voila le code du bouton :
Private Sub Cmd_sauv_Click()
On Error GoTo err
If Lbl_TotalTTC.Caption = "" Then
MsgBox "Votre Facture est vide, création annulé", vbInformation + vbOKOnly, "TIPB"
Exit Sub
End If
If lbl_ClientsEnCours.Caption = "Aucun Client de sélectionné" Then
MsgBox "Il faut choisir un client avant de pouvoir crée la facture", vbInformation + vbOKOnly, "TIPB"
Exit Sub
End If
Set rst = dbs.OpenRecordset("Select * from [T_Record] where [T_NumFacture]='" & Txt_NumFacture.Text & "'")
rst.MoveLast
rst.MoveFirst
If rst.RecordCount = 0 Then
Set recordset = dbs.OpenRecordset("T_Record", dbOpenDynaset)
recordset.AddNew
recordset![T_NumFacture] = Txt_NumFacture.Text
recordset![T_RaisonSocial1] = "P"
recordset![T_RaisonSocial2] = "L "
recordset![T_Clients] = lbl_ClientsEnCours.Caption
recordset![T_AdresseClients] = lbl_Adresse1ClientEnCours.Caption
recordset![T_AdresseClients2] = lbl_Adresse2ClientEnCours.Caption
recordset![T_RemisePersonne] = Lbl_MontantRemisepersonne.Caption If Lbl_Perc_personne.Caption "" Then Lbl_Perc_personne.Caption " "
recordset![T_PercRemisePersonne] = Lbl_Perc_personne
If Lbl_MontantRemisematières.Caption = "" Then
Lbl_MontantRemisematières.Caption = " "
recordset![T_RemiseMatieres] = Lbl_MontantRemisematières.Caption If Lbl_TTC_matieres.Caption "" Then Lbl_TTC_matieres.Caption " "
recordset![T_PercRemiseMatieres] = Lbl_Perc_matières.Caption If Lbl_TotalTTC.Caption "" Then Lbl_TotalTTC.Caption " "
recordset![T_TotalTTC] = Lbl_TotalTTC.Caption & " €"
recordset![T_TotalHT] = Lbl_TotalHT.Caption & " €"
recordset![T_DontTVA] = Lbl_TotalTVA.Caption & " €"
mois = UCase(Format(DTPicker1.Value, "MMMM"))
recordset![T_DateCreation] = Format(DTPicker1.Value, "DD") & " " & mois & " " & DTPicker1.Year
recordset![T_HeureCreation] = Time
recordset![T_AnneeIndex] = DTPicker1.Year
recordset![T_TVA] = TVA_Courante
recordset.Update
Set recordset = dbs.OpenRecordset("T_Facture_personne", dbOpenDynaset)
For a = 1 To ListView1.ListItems.Count
'PrixPersonne = Val(PrixPersonne) + Val(ListView1.ListItems(a).SubItems(6))
Set recordset = dbs.OpenRecordset("T_Facture_matières", dbOpenDynaset)
For a = 1 To ListView2.ListItems.Count
'PrixPersonne = Val(PrixPersonne) + Val(ListView1.ListItems(a).SubItems(6))
End If
Cmd_sauv.Enabled = False
MsgBox "Création correctement effectué", vbInformation + vbOKOnly, "TIPB"
Exit Sub
err:
If err.Number = 3021 Then Resume Next
End Sub
il y a t'il un nombre maximun de caracteres
en tous cas c'est bizarre,,auriez vous une idée
merci
petchy