Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub SearchReportsForField(fldname)
Dim rpt
Dim ctl
Dim strReportList
For Each rpt In CurrentProject.AllReports
DoCmd.OpenReport rpt.Name, acViewDesign
For Each ctl In Reports(rpt.Name).Controls
If ctl.ControlType = acComboBox _
Or ctl.ControlType = acListBox _
Or ctl.ControlType = acTextBox Then
If ctl.ControlSource <> "" Then
If InStr(1, ctl.ControlSource, fldname) > 0 Then
Debug.Print Reports(rpt.Name).Name; " "; ctl.Name; " "; ctl.ControlSource
End If
End If
End If
Next
DoCmd.Close acReport, rpt.Name
Next
End Sub
Sub SearchFormsForField(fldname)
Dim frm
Dim ctl
For Each frm In CurrentProject.AllForms
DoCmd.OpenForm frm.Name, acViewDesign
For Each ctl In Forms(frm.Name).Controls
If ctl.ControlType = acComboBox _
Or ctl.ControlType = acListBox _
Or ctl.ControlType = acTextBox Then
If ctl.ControlSource <> "" Then
If InStr(1, ctl.ControlSource, fldname) > 0 Then
Debug.Print Forms(frm.Name).Name; " "; ctl.Name; " "; ctl.ControlSource
End If
End If
End If
Next
DoCmd.Close acForm, frm.Name
Next
End Sub
Sub SearchQueriesForField(fldname)
Dim qdf
Dim ctl
For Each qdf In CurrentDb.QueryDefs
If InStr(1, qdf.SQL, fldname) > 0 Then
Debug.Print qdf.Name
End If
Next
End Sub