Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Code Archive _ Search For Text, A2000+

Posted by: datAdrenaline Aug 15 2012, 06:36 PM

First note: This application is for A2000 and up, I selected 'All Versions' because of the wide audience the utility can apply to. I have down converted to A97 with success, if you have that need, please let me know. In the mean time, I do have an earlier version of the utility (, that has an A97 compatible file available.
This is a utility that I use to find objects in my application that contain a string pattern you specify. This is useful when you want to change a field name in a table, but you need to find out where you have used it first to see if it is worth changing the name or not. This utility is also good for determining if you can delete some old queries or tables you suspect you are not using any more, just type in the name of that query/table, select the object types you wish to search, then 'Search' the utility will point you to all occurrences of that string.
When searching Query, Form, and Report object types, you have to option to edit and save the property in which the string pattern was found. That feature is very helpful when you change the name of a Table or Query object or name of a Field in a Table object.
Osearch Queries, Forms, Reports, Tables, Modules, Macros, and Command Bars (code for command bars was not originated by me). The code behind Forms and Reports is also searched.
I realize that with A2000 and up has the 'Name AutoCorrect' feature, however, I personally do not use that feature for reasons mentioned on UtterAccess and elsewhere on the web. This utility may not be perfect either, but it sure has been a lifesaver for me. I hope you find it useful as well.
The Zip file contains and MDB file in Access 2000 format. To use this utility just extract the MDB from the Zip file, then import the xdlgSearchForText_v42 Form object into your database application. All the code needed is behind the form. A reference to the DAO object library is expected (a check for that library is done on Form_Open).
If you have any questions, please contact me. ( 71.03K ): 1481

Posted by: ifiaz Jul 12 2019, 09:46 AM

Hi This is a great tool!

I have saved the file to .accdb format (Access 2016) and it works flawlessly.

Hope this helps someone.

Thank you to the original author. ( 51.86K ): 81

Posted by: datAdrenaline Aug 1 2019, 10:37 AM

You are most welcome! thumbup.gif ... Thank you for updating to .accdb!

Posted by: paul_hammond Aug 8 2019, 02:04 PM

Just downloaded this. It will be very help after the demise of Find and Replace.

Thanks for posting.

Posted by: NewToAccess2019 Aug 22 2019, 11:58 AM

I tried this utility, for some reason it can only search table-names and not the actual text in one of the columns of the tables.
Can someone through some light on this?

Posted by: datAdrenaline Aug 23 2019, 09:39 AM

This utility does not search data, it searches defined objects -- TableDefs, QueryDefs, Forms, Reports, etc. It searches through all the objects used to design and develop a database.

Posted by: NewToAccess2019 Aug 26 2019, 11:29 AM

Got it, I found something that fit my requirement.

The only problem with the new code is, it gives me the error (6- Overflow In Procedure : btn_Search_Click in Form_frm_Search)
and comes to a halt (however it does search the table and column name).
The code is and forms in the attachment. ( 44.67K ): 27

Posted by: dstelley Sep 10 2019, 03:22 PM

The search works flawlessy in my access database. I have literally hundreds of replacements needed in many many class objects for forms.
It finds them all under the Modules tab.
Is there a way to use the replace functionality?
Or a simple tutorial?

The edit & Replace tab has "Found Where" and Value. How do I use it?