Public Function renom(strPrefixe As String) As Boolean ' ' Liaison de tables via ODBC : ' renomme les tables xxxxxx_NomTable par NomTable ' le préfixe inclut le souligné ' Requis : DAO (ex. Microsoft DAO 2.5/3.51 Compatibiliy Library) ' ----------------------------------------------------------- ' JJ Lechauve - IRD 2004 Dim db As Database Dim tdfI As TableDef Dim strNomTable As String, l As Integer, s As Integer Set db = CurrentDb() l = Len(strPrefixe) renom = False If l = 0 Then Exit Function For Each tdfI In db.TableDefs strNomTable = tdfI.Name If Mid(strNomTable, 1, 4) <> "MSys" Then s = InStrRev(strNomTable, strPrefixe) If s <> 0 Then ' Debug.Print strNomTable; " : "; Mid(strNomTable, s + l) tdfI.Name = Mid(strNomTable, s + l) renom = True End If End If Next tdfI End Function