first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

Code: basRenLinkTbls()

Public Sub basRenLinkTbls() ' 'This procedure renames all tables starting with "dbo_". ' Dim DAOTblDef As DAO.TableDef

With Application

    For Each DAOTblDef In CurrentDb.TableDefs
        If VBA.InStr(1, DAOTblDef.Name, _
            "dbo_",  vbTextCompare) > 0 Then
            DAOTblDef.Name = VBA.Mid$(DAOTblDef.Name, 5)
        End If
    Next
    
    .CurrentDb.TableDefs.Refresh
    .RefreshDatabaseWindow
    
End With

End Sub

mod date: 1999-09-08T05:21:49.000Z