| Profil supprimé | J'ai trouve ca comme code vba sur internet, je vais voir si ca marche
 
 | Code : 
 Sub Insertion(oRst1 As DAO.Recordset, orst2 As DAO.Recordset)On Error GoTo err  Dim Fld As DAO.Field    orst2.AddNew    For Each Fld In oRst1.Fields      If (Fld.Attributes And dbAutoIncrField) = 0 Then        orst2.Fields(Fld.Name).Value = Fld.Value      End If    Next Fld    orst2.Updateerr:End SubSub copier()Dim NomTable1 As String, NomTable2 As StringDim oRst1 As DAO.Recordset, orst2 As DAO.RecordsetDim odb As DAO.DatabaseDim Message As StringSet odb = currentdbNomTable1 = "TblClient"NomTable2 = "TblClientSansDoublons"Set oRst1 = odb.OpenRecordset(NomTable1)Set orst2 = odb.OpenRecordset(NomTable2)While Not oRst1.EOF  Insertion oRst1, orst2  oRst1.MoveNextWendIf Not orst2.EOF Then orst2.MoveLastMessage = "Opération terminée" & vbCrLf & vbCrLf & _          "La table source comportait : " & oRst1.RecordCount & " enregistrement(s)," & vbCrLf & _          "la table de destination en comporte " & orst2.RecordCountMsgBox Message, vbInformation, "MAJ terminée"End Sub
 | 
   |