M
Morten Snedker
I'm using Access XP, ADP running against MS-SQL 2000.
The following code is used to search the recordsource of all forms for
a given expression:
'--
Dim strSearch As String, i As Integer
strSearch = "tblLYSSpecLokaler"
For Each obj In dbs.AllForms
DoCmd.OpenForm obj.Name, acDesign, , , , acHidden
If (InStr(1, Forms(obj.Name).RecordSource, strSearch) > 0)
Then
i = i + 1
Debug.Print "Forms " & obj.Name & " ---> " &
Forms(obj.Name).RecordSource
End If
DoCmd.Close acForm, obj.Name, acSaveNo
Next obj
'--
If the form is based on a view my search may fail. Is there a way to
extend the search so I can search the SQL-statement of the view as
well?
Regards /Snedker
The following code is used to search the recordsource of all forms for
a given expression:
'--
Dim strSearch As String, i As Integer
strSearch = "tblLYSSpecLokaler"
For Each obj In dbs.AllForms
DoCmd.OpenForm obj.Name, acDesign, , , , acHidden
If (InStr(1, Forms(obj.Name).RecordSource, strSearch) > 0)
Then
i = i + 1
Debug.Print "Forms " & obj.Name & " ---> " &
Forms(obj.Name).RecordSource
End If
DoCmd.Close acForm, obj.Name, acSaveNo
Next obj
'--
If the form is based on a view my search may fail. Is there a way to
extend the search so I can search the SQL-statement of the view as
well?
Regards /Snedker