Tool for identifying field names?

  • Thread starter Thread starter Mike Sims
  • Start date Start date
M

Mike Sims

Is anyone aware of a utility that can search through a compiled access
application which can identify the names of all the text boxes within
the app?

We are customizing a program we purchased, and the coders didn't use
standard naming conventions when addressing the text boxes, so we need a
tool which can help us with this.

Thanks in advance for any information.

Mike
 
Depending on what you're doing, there may be no need for a utility. The
following VBA code will pump out a list of all text boxes on all forms in
the current database. Change the line Set dbCurr = CurrentDb() if you want
to document an external database.

Sub FindSubforms()
Dim dbCurr As DAO.Database
Dim conForms As DAO.Container
Dim docCurr As DAO.Document
Dim ctlCurr As Control
Dim frmCurr As Form
Dim intLoop As Integer

DoCmd.Hourglass True

Set dbCurr = CurrentDb()
Set conForms = dbCurr.Containers!Forms
With conForms
For Each docCurr In .Documents
DoCmd.OpenForm docCurr.Name, acDesign, , , acFormReadOnly,
acHidden
Set frmCurr = Forms(docCurr.Name)
For Each ctlCurr In frmCurr.Controls
If ctlCurr.ControlType = acTextBox Then
Debug.Print frmCurr.Name & " contains " & ctlCurr.Name
End If
Next ctlCurr
DoCmd.Close acForm, frmCurr.Name, acSaveNo
Next docCurr
End With

Set ctlCurr = Nothing
Set frmCurr = Nothing
Set docCurr = Nothing
Set conForms = Nothing
Set dbCurr = Nothing

DoCmd.Hourglass False

End Sub
 
Back
Top