ACCESS VBA modify the table name
Private Sub changetabname_Click() Dim tbl As TableDef Dim dbs As Database I'm nbl As string Dim obl As String nbl = "Newtable" Set dbs = CurrentDb For Each tbl In dbs.TableDefs obl = tbl.Name If obl = "Table1" Then tbl.Name = nbl MsgBox "modified successfully", vbInformation, "prompt" End If Next End Sub