I have tried this several ways. still not working
ALTER TABLE current_addresses
RENAME COLUMN current_addresses.[Match__Company_Name__c] TO [Co_Name];
I have tried this several ways. still not working
ALTER TABLE current_addresses
RENAME COLUMN current_addresses.[Match__Company_Name__c] TO [Co_Name];
just go into design mode, rename it.
no need to use code.
Why do you need SQL action to do this? Open the table in design view and change the name. A process that programmatically modifies db design is often indication of poor structure.
Apparently Access engine does not support RENAME COLUMN. http://www.dbforums.com/showthread.p...-Rename-Column
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
I'd go to table design and rename the field --simple.
If you need code, try
CurrentDb.TableDefs("MyTable").Fields("OldFieldNam e").Name="NewFieldName"
there are more than 30-40 columns to rename and it is a new file every day. I would not want to physically rename them all.
Then your design is bad. Or you have the wrong tool.
Tell us more. Describe in simple plain English the "problem/opportunity".
its not a design flaw its the way the file comes to us. i just wanted to rename them to make them easier to read.
Then you will have to use VBA and TableDefs to accomplish. The link I provided has an example.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
How about a few sentences re:
Tell us more. Describe in simple plain English the "problem/opportunity".