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 Function FindVal(ByVal varSearchVal As Variant)
Dim ThisDB As DAO.Database
Dim TDef As DAO.TableDef
Dim rstSearchMe As DAO.Recordset
Dim MyField As DAO.Field
Dim lngRecordNumber As Long
Dim strResults As String
Set ThisDB = CurrentDb
For Each TDef In ThisDB.TableDefs
If Left$(TDef.Name, 4) <> "MSys" Then
lngRecordNumber = 1
Set rstSearchMe = ThisDB.OpenRecordset(TDef.Name, dbOpenSnapshot)
With rstSearchMe
.MoveFirst
Do While Not .EOF
For Each MyField In rstSearchMe.Fields
If rstSearchMe(MyField.Name).Value = varSearchVal Then
strResults = strResults & "Value found in table " & TDef.Name & " in field " & MyField.Name & " at record number " & lngRecordNumber & "." & vbCrLf
End If
Next MyField
.MoveNext
lngRecordNumber = lngRecordNumber + 1
Loop
End With
End If
Next TDef
FindVal = strResults
End Function
I would advise against directly inserting into another application's database, especially an accounting system. There's a good chance you will not be able to discover all the business rules of the application. You could end up wrecking the system.johnny45 said:...and in order to "manipulate" the DB outsite of the application itself one needs to understand how records are written and were....I just though that by being able to search across the DB I could track the transactions so as to know which tables are affected .....so rather than key in the using cumbersome interface I could import my inventory count.