Question Find instances of field name usage.

carpy01

Registered User.
Local time
Yesterday, 23:49
Joined
Mar 29, 2012
Messages
12
I have written a large database for the school I used to work for. In the main table there is a field named "Active" which is text with yes or no choices.

Is there a way to find in what objects this field is being used in the database?

For the life of me I can't remember why I put this field in or if its even used now.

This database has had many versions over the years.

I have searched many of the queries but can not find where this field is used.

If there isn't a way I plan to backup, remove field from table and test all the features of the program to see which crashes. However I'm hoping there might be a quicker way.

This was one of the first DB I wrote and didn't pay much attention to mapping or keeping notes back then.

Thanks before hand for any help!
 
Last edited:
I'm using Access 2010.

You could look at the Database Documenter, on the Database Tools tab, the results of which can be dumped to a Word document and then searched.

It will list all sort of info about the various tables, queries, forms etc including what columns are used where.
 
Get V-tools
 
Installed it ... eventually. Windows 7 security, what a PITA. :banghead:
 
Last edited:
Or create your own search:
Code:
Dim tbl As TableDef
Dim qdf As QueryDef
Dim fld As Field

Dim FieldToFind As String
    FieldToFind = "Active" 'The name of the field you are looking for
    
    With CurrentDb
        For Each tbl In .TableDefs
            For Each fld In tbl.Fields
                If fld.Name = FieldToFind Then
                    MsgBox ("Table: " & tbl.Name)
                End If
            Next fld
        Next tbl
        For Each qdf In .QueryDefs
            For Each fld In qdf.Fields
                If fld.Name = FieldToFind Then
                    MsgBox ("Query: " & qdf.Name)
                End If
            Next fld
        Next qdf
    End With
 
Or create your own search

That will only find the field in the queries.

There are many other potential locations including:
SQL RecordSources
ControlSource expressions
Combo/Listbox RowSources
Code Modules

No need to reinvent the wheel. V-tools already does a great job and is free.
 

Users who are viewing this thread

Back
Top Bottom