1 2 3 4 5 6 7
| 'Definition de la fonction SQL de mise a jour
Dim RequeteSQL_FCT As String
'Requete de MAJ de l'exploitant'
RequeteSQL_FCT = "UPDATE Exploitants SET Exploitants.Nom = '" & Replace(Nom_FCT,"'","''") & "', Exploitants.Prenom = '" & Replace(Prenom_FCT,"'","''") & "', Exploitants.EVV = '" & replace(EVV_FCT,"'","''") & "', Exploitants.DateNaissance = #" & DateNaissance_FCT & "#, Exploitants.Adresse = '" & Replace(Adresse_FCT,"'","''") & "', Exploitants.CodePostal = " & CodePostal_FCT & ", Exploitants.Commune = '" & Replace(Commune_FCT,"'","''") & "', Exploitants.Telephone = " & Telephone_FCT & ", Exploitants.Fax = " & Fax_FCT & ", Exploitants.Courriel = '" & Courriel_FCT & "', Exploitants.DossierHorsPlan = '" & replace(DossierHorsPlan_FCT,"'","''") & "', Exploitants.Commentaires = '" & Replace(Commentaires_FCT,"'","''") & "' WHERE (((Exploitants.CodeExploitant)=" & CodeExploitant_FCT & "));"
'Execution de la requete
MsgBox (RequeteSQL_FCT)
'MajExploitant = DoCmd.RunSQL (RequeteSQL_FCT) |
Partager