Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use Alter Table to change column name

Status
Not open for further replies.

traingamer

Programmer
Jun 18, 2002
3,270
US
Can I use 'Alter Table' to change a column name in Access? If so, what is the format?
OR do I have to add a new column, copy the data from the old column, and drop the old column?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Hi
Would tabledefs be any use to you?
Code:
    Dim dbs As Database, tdf As TableDef
    ' Return reference to current database.
    Set dbs = CurrentDb
    ' Create TableDef object.
    Set tdf = dbs.TableDefs("Contacts")
    tdf.Fields("ContactNo").Name = "Blah"
    'Debug.Print tdf.Fields("ContactNo").Name
    Set dbs = Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top