renaming a field in a table in visual basic

P

Pierre Laporte

I need to rename some field in many databases in Visual Basic. I know how to
create fields using .CreateField.
I am using Office 2000.
 
D

Douglas J. Steele

Assuming you've got a reference set to DAO, you can use

CurrentDb().TablesDefs("NameOfTable").Fields("OldFieldName").Name =
"NewFieldName"
 
P

Pierre Laporte

Thanks Doug,

It worked with

CurrentDb().TableDefs("NameOfTable").Fields("OldFieldName").Name =
"NewFieldName"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top