Search This Blog

Friday, January 15, 2010

Rename Microsoft Access Table

VB 6 > DAO > Rename table

(Used DAO 3.6 as reference.)

Public Sub rentbl()
  Dim dbSS As Database
  Dim strDbName As String
  strDbName = "c:\temp\test.mdb"
  Set dbSS = OpenDatabase(strDbName)
  dbSS.CreateTableDef
  dbSS.TableDefs("R2").Name = "Org_R2"
  dbSS.Close
  Set dbSS = Nothing
End Sub