Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

100s of controls w/ formulas-need to find references to a field

Status
Not open for further replies.

ajaeger

Technical User
Feb 6, 2003
201
US
I have a report that has hundreds of text boxes on it. Many of these text boxes have formulas as their control source. We had to change a field name (from "Item890" to "Item870") in the table that is referenced in all of these control source formulas. I when through the report and thought that I had found all of the references to "Item890". However, when I run the report, I get an error message that leads me to believe I have missed at least one reference to "Item890". The error is:

"The Microsoft Jet database engine does not recognize 'Consolidated_crosstab.[Item890]' as a valid ield name or expression."

My question is...is there a way to search the report for references to this field? Or do I have to go through each property for each control in the Properties window?

Thanks!

Anna Jaeger
iMIS Database Support
 
Perhaps something like:
Code:
For Each rpt In CurrentProject.AllReports
    DoCmd.OpenReport rpt.Name, acViewDesign
    For Each ctl In Reports(rpt.Name).Controls
      'for example
      If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox Then
        If ctl.ControlSource = "Item890" Then
            Debug.Print ctl.Name
        End If
      End If
    Next
    DoCmd.Close
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top