| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- Option Compare Database
- '****
- '*
- '* VCS checks
- '*
- '****
- Sub diagnostic()
- Dim obj As Object
- Dim count As Integer
- Dim td As TableDef
- Dim qd As QueryDef
-
- Dim oFSO As Object
- Set oFSO = CreateObject("Scripting.FileSystemObject")
- Dim oFile As Object
- Set oFile = oFSO.CreateTextFile("c:\applis_parc\ztest\diag_" & CurrentProject.name & ".txt", ForAppending)
-
-
- oFile.WriteLine ("# tbl def")
- count = 0
- For Each td In CurrentDb.TableDefs
- 'Debug.Print td.Name
- oFile.WriteLine td.name
- count = count + 1
- Next
- Debug.Print "tbldef", count
-
- oFile.WriteLine ("# query def")
- count = 0
- For Each qd In CurrentDb.QueryDefs
- 'Debug.Print qd.Name
- oFile.WriteLine qd.name
- count = count + 1
- Next
- Debug.Print "queries", count
-
- oFile.WriteLine ("# reports")
- count = 0
- For Each obj In CurrentProject.AllReports()
- 'Debug.Print obj.Name
- oFile.WriteLine obj.name
- count = count + 1
- Next
- Debug.Print "reports", count
-
- oFile.WriteLine ("# forms")
- count = 0
- For Each obj In CurrentProject.AllForms()
- 'Debug.Print obj.Name
- oFile.WriteLine obj.name
- count = count + 1
- Next
- Debug.Print "forms", count
-
- oFile.WriteLine ("# macros")
- count = 0
- For Each obj In CurrentProject.AllMacros()
- 'Debug.Print obj.Name
- oFile.WriteLine obj.name
- count = count + 1
- Next
- Debug.Print "macros", count
-
- oFile.WriteLine ("# modules")
- count = 0
- For Each obj In CurrentProject.AllModules()
- oFile.WriteLine obj.name
- 'Debug.Print obj.Name
- count = count + 1
- Next
- Debug.Print "modules", count
-
- End Sub
|