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.
public Sub SearchAll(ByVal pstrSearch As String)
Dim dbCurrent As Database
Dim tdfTable As TableDef
Dim rstRecords As dao.Recordset
Dim fldField As Field
Dim lngRecordNumber As Long
Set dbCurrent = CurrentDb
Debug.Print "Searching for " & pstrSearch & " in all Tables and Fields"
Debug.Print "TableName!FieldName(RecordNumber)=FieldContents"
For Each tdfTable In CurrentDb.TableDefs
Set rstRecords = dbCurrent.OpenRecordset(tdfTable.Name, dbOpenForwardOnly)
lngRecordNumber = 0
Do While Not rstRecords.EOF
For Each fldField In tdfTable.Fields
If "" & rstRecords(fldField.Name) Like pstrSearch Then
Debug.Print tdfTable.Name & "!" & fldField.Name & "(" & lngRecordNumber & ")=" & rstRecords(fldField.Name)
End If
Next fldField
lngRecordNumber = lngRecordNumber + 1
rstRecords.MoveNext
Loop
Next tdfTable
End Sub