Others

How to Search Microsoft Access Database Objects for a String

Huda QurayshiHuda Qurayshi Nov 13, 2026 868 views

Question details

The user needs to locate a field name or specific text across Microsoft Access tables, queries, forms, reports, modules, and other database objects.

How to Search Microsoft Access Database Objects for a String
Product
Microsoft Access
Device & OS
not provided
Scenario
Reviewing a database to identify where a field or text string is used before making changes.
Observed behavior
The desired result is a list of matching objects and references, rather than a search limited to records in one table.
Before you start

Identify whether you are searching for a field reference, text in object definitions, VBA code, or stored record values, because search tools cover different scopes. Use a database that allows design and VBA access, and enable code only after reviewing and trusting its source.

Solution 1Recommended

Use a VBA search utility to locate field references

Use this approach when you need to find where a field is referenced and can add a standard VBA module to the database.

Allen Browne's FindField utility is a starting point for locating field usage. Check its documentation for supported objects and limitations; a field-reference utility should not be assumed to search every property, module, or stored value.

1
Get the search procedure

Open http://allenbrowne.com/ser-73.html and read the instructions for FindField. Copy the supplied VBA code and any supporting procedures specified on that page.

2
Add a standard module

Open your database in Microsoft Access, press Alt+F11 to open the Visual Basic Editor, and choose Insert > Module. Paste the utility code into the new standard module and save it with a name such as modFieldSearch.

3
Check the code

In the Visual Basic Editor, choose Debug > Compile to check for errors. If compilation fails, confirm that you copied all required code and resolve any missing references under Tools > References.

4
Run the field search

Press Ctrl+G in the Visual Basic Editor to open the Immediate window. Enter ? FindField("YourFieldName"), replace YourFieldName with the actual field name, and press Enter.

5
Inspect the reported references

Review the utility's output, then open each matching object from the Access Navigation Pane in Design View, SQL View, or the Visual Basic Editor as appropriate to verify the reference.

Use a VBA search utility to locate field references
Field usage is not the same as every text match: This approach is intended for the utility's documented field-search scope. For arbitrary strings in VBA, object properties, SQL definitions, or table records, use a tool or search method that explicitly supports those locations.
Free Microsoft Office alternative

Use WPS Office for Spreadsheet-Based Reviews of Access Data

WPS Office is a free, lightweight, easy-to-use alternative for documents and spreadsheets, with a familiar interface and Microsoft Office format compatibility for a smooth transition. It does not replace Microsoft Access or search Access database objects, but WPS Spreadsheet can help review table or query results exported from Access to Excel format.

Review exported Access table or query results with spreadsheet search and filtering.Work with Microsoft Excel .xlsx and .xls files exported from Access.Use a familiar interface for everyday spreadsheet and document tasks.Move compatible Office files into a free, lightweight productivity suite without rebuilding them.
microsoft office alternative - wps office

Frequently Asked Questions

Does Ctrl+F search every object in an Access database?

No. In a table or form, Home > Find searches records within the selected scope. In the Visual Basic Editor, Edit > Find can search VBA code, but it does not also search all query definitions, form properties, report properties, and table data.

Where do I run ? FindField("YourFieldName")?

First add the complete FindField utility to a standard module using Alt+F11 > Insert > Module. Then press Ctrl+G in the Visual Basic Editor, enter ? FindField("YourFieldName") in the Immediate window with your actual field name, and press Enter.

Will a field-reference search find text stored in table records?

Not necessarily. Field-reference tools generally inspect supported definitions or references, not every stored value. To search record values, open the relevant table and use Home > Find, or create a query with criteria such as Like "*search text*" on the appropriate text field.

Can I replace a field name everywhere after finding it?

Do not assume every match can be replaced safely. Review the matching objects and the replacement tool's supported scope, make a separate database copy, and test affected queries, forms, reports, and VBA afterward. A matching string may be a label or unrelated text rather than a field reference.

Can WPS Office search inside an Access database?

WPS Office does not provide Microsoft Access database-object search or replace Access functionality. For reviewing record data, select a table or query in Access, use External Data > Excel to export it, and open the exported workbook in WPS Spreadsheet.