Question Name chnage of tables, queries and autom. corresponding change of references to those

panchitocarioca

Registered User.
Local time
Today, 04:29
Joined
Aug 11, 2008
Messages
11
dear all,

i have a databse with a relatively large number of tables, queries, forms and reports as well as a significant amount of vba code and expressions. Now, the name of a number of the tables, queries, forms and reports has to be changed. However, the references to those in the queries, forms, reports, vba code and expressions should also be changed accordingly, otherwise the database does not work anymore. Does anyone know if change in the references can be done automatically or relatively easy without having to go through the entire database to check and change each and every reference/item.

many thanks in advance for the help.

best regards,
 
out of interest, why would the names of objects, etc HAVE to be changed?
 
Fixing your code is easy. Just use Find & Replace (ctrl + H), and apply to the Current Project.

For the queries, you'll could write some VBA to loop through all the querydefs in the database. For each one, search the SQL property of the querydef for your tablename - and replace it.

If you have a lot of comboboxes on a lot forms, you'd have to do something similar for the forms. Loop through each controal on each form...
 

Users who are viewing this thread

Back
Top Bottom