Renaming tables

K

Keith Emery

I want to rename all tables in a database from XXXName1 to
Name1

I think I should be using

with each tabledef in db

But can't get the correct sytax

Thanks
 
A

Alex Dybenko

first make sure you have a reference to DAO, then:
dim tdf as tabledef

for each tdf in dbs.tabledefs
if tdf.name like "???Name1" then
tdf.name=mid(tdf.name,4)
end if
next tdf
 

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