Find/Replace All

kparadise

Board Regular
Joined
Aug 13, 2015
Messages
186
Hello,

I currently have a big Access Database with many tables, queries, forms, reports. I am trying to clean it up.

The first thing I did was rename the queries to match their corresponding reports. I see that when I change a query name, it will automatically update the Source in the report properties sheet, which is great.

I do have one error; in one of my reports, I have a sub-form on the first page. That sub-form has a lot of detail still connected to the old query name, and is throwing an Error when I run the report.

Question: Can I run a VB Code on that form, to do a find/replace-all from the old query name to my new query name??
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Sounds like you have auto-correct turned on. Be very careful. I have see it correct many database. That is why most Access gurus/experts keep it turned off.

Wow, renaming objects. That can really tear up you databases.

MAKE a BACK UP OF YOUR DATABASE OFTEN


MAKE a BACK UP OF YOUR DATABASE OFTEN

If you really want to reamer objects in your database I would urge you to get this tool: Find and Replace

I have helped others in the past recover their database after doing what you have described.

What I learned from other people's attempt at renaming objects is :
1) Make one name change at a time.\
2) After each name change you will need ofully test the databes to be sure that it did not break anything else. Skipping the testing part is what can quickly make your database very buggy and hard to recover without lots of lost work.
3) Make a back up.

Repeat for each name change.

For a few of my database that started in the 90's with Access 2.0 here is what I do:

1) create a new blank database
2) link all the tables to the back end ( I always split very database from the start)
3) Import code modules and set VBA references

Next it is time to import the other objects. I do then one at a time starting with in the first object used by the end user. At this time I will rename and/or rebuild objects and fully test it. This makes it easier to test as you go so you do not have to fully test the database each time. Adapting Agile development testing best practices. Make a back u and then import the next object.

By dong it this way you can identify unused objects and not import them into the new databases.

I all used tools from FMS, Incs. See: Get Rid of Unused Objects and VBA Code in Microsoft Access Databases
 
Upvote 0

Forum statistics

Threads
1,221,840
Messages
6,162,311
Members
451,759
Latest member
damav78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top