| Line-No. / Ref. | Code Line |
| 0001 | Public Sub Archive_Notes() |
| 0002 | 'This sub copies to the Notes Archive any non-Temp Note that has either changed its Text or its Privacy status |
| 0003 | 'As this selects all such notes, it is essential that this Sub is only invoked if a "changed Notes only" Notes-Output run is performed. |
| 0004 | Dim strControlQuery As String |
| 0005 | Dim rsTableToRead As Recordset |
| 0006 | Dim rsTableControl As Recordset |
| 0007 | DoCmd.OpenQuery ("Notes_Archive_Temp_Zap") |
| 0008 | strControlQuery = "SELECT Notes.ID, Notes.Item_Title, Notes.Item_Text, Notes_Archive_Latest.Item_Text, Notes.[Jump_Table?], Notes.Note_Group, Notes.Master_Note, Notes.Last_Changed, Notes.[Private?], Notes.Status, Notes.[Title?], Notes.[Respondent?], " & Last_Changed_Timestamp & " AS [Time], Notes_Archive_Latest.[Private?], Notes.Frozen_Timestamp, Notes.Note_Quality FROM Notes LEFT JOIN Notes_Archive_Latest ON Notes.ID = Notes_Archive_Latest.ID ORDER BY Notes.ID;" |
| 0009 | Set rsTableToRead = CurrentDb.OpenRecordset(strControlQuery) |
| 0010 | rsTableToRead.MoveFirst |
| 0011 | Set rsTableControl = CurrentDb.OpenRecordset("SELECT Notes_Archive_Temp.* FROM Notes_Archive_Temp;") |
| 0012 | Do While Not rsTableToRead.EOF |
| 0013 | If rsTableToRead.Fields(9) & "" <> "Temp" Then '(don't archive Temp Notes ... wait until they are no longer Temp) |
| 0014 | 'Check if the text or Privacy Status differs between the current Note and the latest Archived Note |
| 0015 | If (rsTableToRead.Fields(2) <> rsTableToRead.Fields(3) & "") Or (rsTableToRead.Fields(8) <> rsTableToRead.Fields(13)) Then |
| 0016 | rsTableControl.AddNew |
| 0017 | rsTableControl.Fields(0) = rsTableToRead.Fields(0) 'ID |
| 0018 | rsTableControl.Fields(1) = rsTableToRead.Fields(1) 'Title |
| 0019 | rsTableControl.Fields(2) = rsTableToRead.Fields(2) 'Text |
| 0020 | rsTableControl.Fields(3) = rsTableToRead.Fields(4) 'Jump Table? |
| 0021 | rsTableControl.Fields(4) = rsTableToRead.Fields(5) 'Note Group |
| 0022 | rsTableControl.Fields(5) = rsTableToRead.Fields(6) 'Master Note |
| 0023 | rsTableControl.Fields(6) = rsTableToRead.Fields(7) 'Last Changed |
| 0024 | rsTableControl.Fields(7) = rsTableToRead.Fields(8) 'Private? |
| 0025 | rsTableControl.Fields(8) = rsTableToRead.Fields(9) 'Status - eg. Temp |
| 0026 | rsTableControl.Fields(9) = rsTableToRead.Fields(10) 'Title? |
| 0027 | rsTableControl.Fields(10) = rsTableToRead.Fields(11) 'Respondent? |
| 0028 | rsTableControl.Fields(11) = rsTableToRead.Fields(12) 'Last Changed Timestamp = Time |
| 0029 | rsTableControl.Fields(12) = rsTableToRead.Fields(14) 'Frozen Timestamp |
| 0030 | rsTableControl.Fields(13) = rsTableToRead.Fields(15) 'Note Quality |
| 0031 | rsTableControl.Update |
| 0032 | End If |
| 0033 | End If |
| 0034 | rsTableToRead.MoveNext |
| 0035 | Loop |
| 0036 | DoCmd.OpenQuery ("Notes_Archive_GEN") |
| 0037 | DoCmd.OpenQuery ("Notes_LastChanged_Update") |
| 0038 | OK = Convert_Webrefs("Note_Archive", "Full") |
| 0039 | Set rsTableToRead = Nothing |
| 0040 | Set rsTableControl = Nothing |
| 0041 | End Sub |
| Line-No. / Ref. | Code Line |
| 0001 | Public Function CreateDocumentationJumpTables(Procedure_Type, Heading, iTableColumns, Optional Code_Location) |
| 0002 | Dim rsTableToRead As Recordset |
| 0003 | Dim rsTableControl As Recordset |
| 0004 | Dim strControlQuery As String |
| 0005 | Dim strLine As String |
| 0006 | Dim i As Long |
| 0007 | Dim strText As String |
| 0008 | Dim strSearch As String |
| 0009 | Dim strReplace As String |
| 0010 | Dim strColPercentage As String |
| 0011 | 'Read the data |
| 0012 | Select Case Procedure_Type |
| 0013 | Case "Table" |
| 0014 | strDataQuery = "SELECT Table_Definitions.Table_Name FROM Table_Definitions ORDER BY Table_Name;" |
| 0015 | Case "Query" |
| 0016 | If Code_Location >= 9999 Then |
| 0017 | strDataQuery = "SELECT Query_Definitions.Query_Name, Query_Definitions.Query_Type FROM Query_Definitions LEFT JOIN Unused_Queries ON Query_Definitions.Query_Name = Unused_Queries.Query_Name WHERE (((Unused_Queries.Query_Name) Is Null)) ORDER BY Query_Definitions.Query_Name;" |
| 0018 | Else |
| 0019 | strDataQuery = "SELECT Query_Definitions.Query_Name, Query_Definitions.Query_Type FROM Query_Definitions WHERE Query_Definitions.Query_Type = " & Code_Location & " ORDER BY Query_Name;" |
| 0020 | End If |
| 0021 | Case "QueryUnused" |
| 0022 | strDataQuery = "SELECT Unused_Queries.Query_Name, Unused_Queries.Query_Type FROM Unused_Queries ORDER BY Unused_Queries.Query_Name;" |
| 0023 | Case "Fragment" |
| 0024 | strDataQuery = "SELECT Query_Name_Fragments.Query_Name_Fragment FROM Query_Name_Fragments GROUP BY Query_Name_Fragments.Query_Name_Fragment ORDER BY Query_Name_Fragments.Query_Name_Fragment;" |
| 0025 | Case "Private Sub", "Public Sub", "Private Function", "Public Function", "Location" |
| 0026 | If IsMissing(Code_Location) Then |
| 0027 | strDataQuery = "SELECT Code_Table.Procedure_Type, Code_Table.Procedure_Name, Code_Table.Code_Location, Code_Table.ID FROM Code_Table WHERE (((Code_Table.Procedure_Type) = """ & Procedure_Type & """)) ORDER BY Code_Table.Procedure_Type, Code_Table.Procedure_Name;" |
| 0028 | Else |
| 0029 | strDataQuery = "SELECT Code_Table.Procedure_Type, Code_Table.Procedure_Name, Code_Table.Code_Location, Code_Table.ID FROM Code_Table WHERE (((Code_Table.Code_Location) = " & Code_Location & ")) ORDER BY Code_Table.Procedure_Type, Code_Table.Procedure_Name;" |
| 0030 | End If |
| 0031 | Case "Modules" |
| 0032 | If IsMissing(Code_Location) Then |
| 0033 | strDataQuery = "SELECT Code_Table.Module FROM Code_Table GROUP BY Code_Table.Module ORDER BY Code_Table.Module;" |
| 0034 | Else |
| 0035 | strDataQuery = "SELECT Code_Table.Procedure_Name, Code_Location.Code_Location FROM Code_Table INNER JOIN Code_Location ON Code_Table.Procedure_Name = Code_Location.Procedure_Name WHERE (((Code_Table.Module) = """ & Code_Location & """)) ORDER BY Code_Table.Procedure_Name;" |
| 0036 | End If |
| 0037 | Case Else |
| 0038 | MsgBox "Invalid Procedure Type (" & Procedure_Type & ")" |
| 0039 | strDataQuery = "" |
| 0040 | End Select |
| 0041 | Set rsTableToRead = CurrentDb.OpenRecordset(strDataQuery) |
| 0042 | strColPercentage = Round(100 / iTableColumns, 1) |
| 0043 | 'Title |
| 0044 | rsTableToRead.MoveLast |
| 0045 | strLine = "Table of " & Heading & " (" & rsTableToRead.RecordCount & " items)" |
| 0046 | tsTextFile.WriteLine strLine |
| 0047 | 'Table Header |
| 0048 | strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = """ & strControlTable & """) And ((Website_Control.Section) = ""TableHeader"")) ORDER BY Website_Control.Line;" |
| 0049 | Set rsTableControl = CurrentDb.OpenRecordset(strControlQuery) |
| 0050 | rsTableControl.MoveFirst |
| 0051 | Do While Not rsTableControl.EOF |
| 0052 | strLine = rsTableControl.Fields(0) & "" |
| 0053 | tsTextFile.WriteLine strLine |
| 0054 | rsTableControl.MoveNext |
| 0055 | Loop |
| 0056 | 'Accummulate the table-row pro-forma |
| 0057 | strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = """ & strControlTable & """) And ((Website_Control.Section) = ""TableRows"")) ORDER BY Website_Control.Line;" |
| 0058 | Set rsTableControl = CurrentDb.OpenRecordset(strControlQuery) |
| 0059 | rsTableControl.MoveFirst |
| 0060 | strText = "" |
| 0061 | Do While Not rsTableControl.EOF |
| 0062 | If InStr(rsTableControl.Fields(0) & "", "**") > 0 Then |
| 0063 | For i = 1 To iTableColumns |
| 0064 | strText = strText & Replace(rsTableControl.Fields(0) & "", "**Percent**", strColPercentage) |
| 0065 | strText = Replace(strText, "**Column**", "**Column" & i & "**") |
| 0066 | Next i |
| 0067 | Else |
| 0068 | strText = strText & rsTableControl.Fields(0) & "" |
| 0069 | End If |
| 0070 | rsTableControl.MoveNext |
| 0071 | Loop |
| 0072 | i = 1 |
| 0073 | strLine = strText |
| 0074 | If Not rsTableToRead.EOF Then |
| 0075 | rsTableToRead.MoveFirst |
| 0076 | Do Until rsTableToRead.EOF |
| 0077 | Select Case Procedure_Type |
| 0078 | Case "Table" |
| 0079 | strReplace = "" & rsTableToRead.Fields(0) & "" |
| 0080 | Case "Query", "QueryUnused" |
| 0081 | strReplace = "" & rsTableToRead.Fields(0) & "" |
| 0082 | Case "Fragment" |
| 0083 | strReplace = "" & rsTableToRead.Fields(0) & "" |
| 0084 | Case "Private Sub", "Public Sub", "Private Function", "Public Function", "Location" |
| 0085 | strReplace = "" & rsTableToRead.Fields(1) & "" |
| 0086 | Case "Modules" |
| 0087 | If IsMissing(Code_Location) Then |
| 0088 | strReplace = "" & rsTableToRead.Fields(0) & "" |
| 0089 | Else |
| 0090 | strReplace = "" & rsTableToRead.Fields(0) & "" |
| 0091 | End If |
| 0092 | Case Else |
| 0093 | MsgBox "Invalid Procedure Type (" & Procedure_Type & ")" |
| 0094 | End Select |
| 0095 | strSearch = "**Column" & i & "**" |
| 0096 | strLine = Replace(strLine, strSearch, strReplace) |
| 0097 | 'Next Record |
| 0098 | rsTableToRead.MoveNext |
| 0099 | i = i + 1 |
| 0100 | If i > iTableColumns Then |
| 0101 | tsTextFile.WriteLine strLine |
| 0102 | i = 1 |
| 0103 | strLine = strText |
| 0104 | End If |
| 0105 | Loop |
| 0106 | If i <> 1 Then |
| 0107 | For i = i To iTableColumns |
| 0108 | strSearch = "**Column" & i & "**" |
| 0109 | strLine = Replace(strLine, strSearch, ".") |
| 0110 | Next i |
| 0111 | tsTextFile.WriteLine strLine |
| 0112 | End If |
| 0113 | End If |
| 0114 | 'Table Footer |
| 0115 | strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = """ & strControlTable & """) And ((Website_Control.Section) = ""TableFooter"")) ORDER BY Website_Control.Line;" |
| 0116 | Set rsTableControl = CurrentDb.OpenRecordset(strControlQuery) |
| 0117 | rsTableControl.MoveFirst |
| 0118 | Do While Not rsTableControl.EOF |
| 0119 | strLine = rsTableControl.Fields(0) & "" |
| 0120 | tsTextFile.WriteLine strLine |
| 0121 | rsTableControl.MoveNext |
| 0122 | Loop |
| 0123 | strLine = "Go to top of page
" |
| 0124 | tsTextFile.WriteLine strLine |
| 0125 | End Function |
| Line-No. / Ref. | Code Line |
| 0001 | Public Sub CreateDocumentationWebPages() |
| 0002 | 'This is a new module to generate the application code documentation pages |
| 0003 | 'It was based on Sub CreateConcatenatedNoteGroupWebPages |
| 0004 | Dim rsTableControl As Recordset |
| 0005 | Dim strControlQuery As String |
| 0006 | Dim strLine As String |
| 0007 | Dim iTableColumns As Integer |
| 0008 | Dim strFileSuffix As String |
| 0009 | Dim strFileBody As String |
| 0010 | Dim Procedure_Type As String |
| 0011 | Dim Heading As String |
| 0012 | Dim rsTableToRead As Recordset |
| 0013 | Dim rsTableToRead2 As Recordset |
| 0014 | Dim rsProcedure_Location As Recordset |
| 0015 | Dim Procedure_Location As Integer |
| 0016 | Dim Time_Stamp As String |
| 0017 | strControlTable = "DocumentationControl" |
| 0018 | strOutputFileShort = SubSystem & "DocumentationControl" |
| 0019 | strOutputFolder = TheoWebsiteRoot & "\Documentation\" |
| 0020 | strOutputFile = "" |
| 0021 | strFileBody = "" |
| 0022 | strFileSuffix = strOutputFileShort |
| 0023 | Set fsoTextFile2 = New FileSystemObject |
| 0024 | strFolder = strOutputFolder |
| 0025 | 'Create File |
| 0026 | Set tsTextFile = fsoTextFile2.CreateTextFile(strOutputFolder & strOutputFileShort & ".htm", True, True) |
| 0027 | 'Page Header |
| 0028 | strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = """ & strControlTable & """) And ((Website_Control.Section) = ""Header"")) ORDER BY Website_Control.Line;" |
| 0029 | Set rsTableControl = CurrentDb.OpenRecordset(strControlQuery) |
| 0030 | rsTableControl.MoveFirst |
| 0031 | Do While Not rsTableControl.EOF |
| 0032 | strLine = rsTableControl.Fields(0) & "" |
| 0033 | tsTextFile.WriteLine strLine |
| 0034 | rsTableControl.MoveNext |
| 0035 | Loop |
| 0036 | strLine = "" |
| 0037 | tsTextFile.WriteLine strLine |
| 0038 | 'Create list of Tables on this page |
| 0039 | strLine = "" |
| 0040 | tsTextFile.WriteLine strLine |
| 0041 | strLine = "Code by Category |
| 0042 | tsTextFile.WriteLine strLine |
| 0043 | strLine = "Public Subroutines" |
| 0044 | tsTextFile.WriteLine strLine |
| 0045 | strLine = "Public Functions" |
| 0046 | tsTextFile.WriteLine strLine |
| 0047 | strLine = "Code by Module" |
| 0048 | tsTextFile.WriteLine strLine |
| 0049 | strLine = "Tables" |
| 0050 | tsTextFile.WriteLine strLine |
| 0051 | strLine = "Queries |
| 0052 | tsTextFile.WriteLine strLine |
| 0053 | strLine = "Query Fragments" |
| 0054 | tsTextFile.WriteLine strLine |
| 0055 | strLine = "Queries (Probably) Unused by the Generator" |
| 0056 | tsTextFile.WriteLine strLine |
| 0057 | iTableColumns = 4 |
| 0058 | Procedure_Type = "Private Sub" |
| 0059 | Heading = "Private Subroutines" |
| 0060 | OK = CreateDocumentationJumpTables(Procedure_Type, Heading, iTableColumns) |
| 0061 | iTableColumns = 3 |
| 0062 | Procedure_Type = "Public Sub" |
| 0063 | Heading = "Public Subroutines" |
| 0064 | OK = CreateDocumentationJumpTables(Procedure_Type, Heading, iTableColumns) |
| 0065 | iTableColumns = 5 |
| 0066 | Procedure_Type = "Public Function" |
| 0067 | Heading = "Public Functions" |
| 0068 | OK = CreateDocumentationJumpTables(Procedure_Type, Heading, iTableColumns) |
| 0069 | iTableColumns = 5 |
| 0070 | Procedure_Type = "Modules" |
| 0071 | Heading = "Modules" |
| 0072 | OK = CreateDocumentationJumpTables(Procedure_Type, Heading, iTableColumns) |
| 0073 | iTableColumns = 4 |
| 0074 | Procedure_Type = "Table" |
| 0075 | Heading = "Tables" |
| 0076 | Procedure_Location = 9999 |
| 0077 | OK = CreateDocumentationJumpTables(Procedure_Type, Heading, iTableColumns, Procedure_Location) |
| 0078 | iTableColumns = 4 |
| 0079 | Procedure_Type = "Query" |
| 0080 | Heading = "Queries" |
| 0081 | Procedure_Location = 9999 |
| 0082 | OK = CreateDocumentationJumpTables(Procedure_Type, Heading, iTableColumns, Procedure_Location) |
| 0083 | iTableColumns = 6 |
| 0084 | Procedure_Type = "Fragment" |
| 0085 | Heading = "Query Fragments" |
| 0086 | Procedure_Location = 9999 |
| 0087 | OK = CreateDocumentationJumpTables(Procedure_Type, Heading, iTableColumns, Procedure_Location) |
| 0088 | iTableColumns = 4 |
| 0089 | Procedure_Type = "QueryUnused" |
| 0090 | Heading = "Queries (Probably) Unused by the Generator" |
| 0091 | Procedure_Location = 9999 |
| 0092 | OK = CreateDocumentationJumpTables(Procedure_Type, Heading, iTableColumns, Procedure_Location) |
| 0093 | 'Page Footer |
| 0094 | strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = """ & strControlTable & """) And ((Website_Control.Section) = ""Footer"")) ORDER BY Website_Control.Line;" |
| 0095 | Set rsTableControl = CurrentDb.OpenRecordset(strControlQuery) |
| 0096 | rsTableControl.MoveFirst |
| 0097 | Do While Not rsTableControl.EOF |
| 0098 | Time_Stamp = rsTableControl.Fields(0) & "" |
| 0099 | OK = Replace_Timestamp(Time_Stamp) |
| 0100 | tsTextFile.WriteLine Time_Stamp |
| 0101 | rsTableControl.MoveNext |
| 0102 | Loop |
| 0103 | OK = CopyToTransfer(strFolder & "\", strFileSuffix & ".htm") |
| 0104 | Set tsTextFile = Nothing |
| 0105 | 'Create the Code, Query, Query Fragment & Table Web-pages |
| 0106 | CreateCodeWebpages |
| 0107 | CreateQueryWebpages |
| 0108 | CreateTableWebpages |
| 0109 | CreateQueryFragmentsWebpages |
| 0110 | CreateModulesWebpage |
| 0111 | 'Update the Note that documents the MainForm |
| 0112 | Forms_Documenter |
| 0113 | Set tsTextFile = Nothing |
| 0114 | Set rsTableToRead = Nothing |
| 0115 | Set rsTableToRead2 = Nothing |
| 0116 | Set rsProcedure_Location = Nothing |
| 0117 | End Sub |
| Line-No. / Ref. | Code Line |
| 0001 | Public Sub CreateQueryFragmentsWebpages() |
| 0002 | Dim rsTableControl As Recordset |
| 0003 | Dim strControlQuery As String |
| 0004 | Dim strLine As String |
| 0005 | Dim iTableColumns As Integer |
| 0006 | Dim strFileSuffix As String |
| 0007 | Dim Procedure_Type As String |
| 0008 | Dim Heading As String |
| 0009 | Dim rsTableToRead As Recordset |
| 0010 | Dim rsTableToRead2 As Recordset |
| 0011 | Dim rsProcedure_Location As Recordset |
| 0012 | Dim Procedure_Location As Integer |
| 0013 | Dim This_Location As Integer |
| 0014 | Dim This_Object As String |
| 0015 | Dim This_Object_Count As String |
| 0016 | Dim This_Line As Integer |
| 0017 | Dim Last_Location As Integer |
| 0018 | Dim Last_Object As String |
| 0019 | Dim Last_Line As Integer |
| 0020 | 'Create the Documentation_Code_Fragments File |
| 0021 | 'Read the data |
| 0022 | strDataQuery = "SELECT Query_Name_Fragments.* FROM Query_Name_Fragments ORDER BY Query_Name_Fragments.Query_Name_Fragment;" |
| 0023 | Set rsTableToRead = CurrentDb.OpenRecordset(strDataQuery) |
| 0024 | rsTableToRead.MoveFirst |
| 0025 | 'Create File |
| 0026 | strOutputFileShort = SubSystem & "Documentation_Code_Fragments" |
| 0027 | Set tsTextFile = fsoTextFile2.CreateTextFile(strOutputFolder & strOutputFileShort & ".htm", True, True) |
| 0028 | 'Create Page Header |
| 0029 | strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = """ & strControlTable & """) And ((Website_Control.Section) = ""Header"")) ORDER BY Website_Control.Line;" |
| 0030 | Set rsTableControl = CurrentDb.OpenRecordset(strControlQuery) |
| 0031 | rsTableControl.MoveFirst |
| 0032 | Do While Not rsTableControl.EOF |
| 0033 | strLine = rsTableControl.Fields(0) & "" |
| 0034 | tsTextFile.WriteLine strLine |
| 0035 | rsTableControl.MoveNext |
| 0036 | Loop |
| 0037 | 'Create Jump Table |
| 0038 | iTableColumns = 6 |
| 0039 | Procedure_Type = "Fragment" |
| 0040 | Heading = "Query Fragment Documentation" |
| 0041 | Procedure_Location = 0 |
| 0042 | OK = CreateDocumentationJumpTables(Procedure_Type, Heading, iTableColumns, Procedure_Location) |
| 0043 | Do While Not rsTableToRead.EOF |
| 0044 | Heading = rsTableToRead.Fields(1).Value |
| 0045 | 'Create Heading |
| 0046 | strLine = "" & "" & rsTableToRead.Fields(1).Name & ": " & Heading & "
" |
| 0047 | tsTextFile.WriteLine strLine |
| 0048 | 'Create Links to Associated Queries |
| 0049 | strDataQuery = "SELECT Query_Name_Fragments.Query_Name_Fragment, Query_Name_Fragments.Query_Name, Query_Definitions.Query_Type, Query_Name_Fragments.Query_Name_Residue, Query_Definitions_1.Query_Type FROM (Query_Name_Fragments INNER JOIN Query_Definitions ON Query_Name_Fragments.Query_Name = Query_Definitions.Query_Name) LEFT JOIN Query_Definitions AS Query_Definitions_1 ON Query_Name_Fragments.Query_Name_Residue = Query_Definitions_1.Query_Name WHERE (((Query_Name_Fragments.Query_Name_Fragment) = """ & Heading & """)) ORDER BY Query_Name_Fragments.Query_Name;" |
| 0050 | Set rsTableToRead2 = CurrentDb.OpenRecordset(strDataQuery) |
| 0051 | rsTableToRead2.MoveFirst |
| 0052 | strLine = "Queries Using this Query Fragment |
| 0053 | tsTextFile.WriteLine strLine |
| 0054 | Do While Not rsTableToRead2.EOF |
| 0055 | strLine = "" & rsTableToRead2.Fields(1).Value & "" & IIf(rsTableToRead2.Fields(4).Value & "" <> "", " (Residue-query is " & rsTableToRead2.Fields(3).Value & ")", "") & "" |
| 0056 | tsTextFile.WriteLine strLine |
| 0057 | rsTableToRead2.MoveNext |
| 0058 | Loop |
| 0059 | strLine = "" |
| 0060 | tsTextFile.WriteLine strLine |
| 0061 | 'Create Code Links In |
| 0062 | strDataQuery = "SELECT Query_Links_Table.*, Query_Definitions.Query_Type FROM Query_Links_Table LEFT JOIN Query_Definitions ON Query_Links_Table.Object_1 = Query_Definitions.Query_Name WHERE (((Query_Links_Table.Object_2) = """ & Heading & """) AND Query_Links_Table.Object_2_Type = ""F"" AND Query_Links_Table.Object_1_Type = ""C"") ORDER BY Query_Links_Table.Object_1_Type, Query_Links_Table.Object_1, Query_Links_Table.Code_Line;" |
| 0063 | Set rsTableToRead2 = CurrentDb.OpenRecordset(strDataQuery) |
| 0064 | If Not rsTableToRead2.EOF Then |
| 0065 | rsTableToRead2.MoveFirst |
| 0066 | strLine = "Code Using this Query Fragment |
| 0067 | tsTextFile.WriteLine strLine |
| 0068 | strLine = "" |
| 0069 | Last_Object = "zzzz" |
| 0070 | This_Object_Count = 0 |
| 0071 | Do While Not rsTableToRead2.EOF |
| 0072 | This_Object = rsTableToRead2.Fields(0) |
| 0073 | 'Find the Code_Location ... |
| 0074 | Set rsProcedure_Location = CurrentDb.OpenRecordset("Select Code_Location.Code_Location FROM Code_Location WHERE Code_Location.Procedure_Name = """ & This_Object & """;") |
| 0075 | rsProcedure_Location.MoveFirst |
| 0076 | This_Location = rsProcedure_Location.Fields(0) |
| 0077 | This_Line = rsTableToRead2.Fields(4) |
| 0078 | If Last_Object = This_Object Then |
| 0079 | If This_Object_Count = 1 Then |
| 0080 | strLine = "" & Last_Object & " (From Lines " & Last_Line & ", " |
| 0081 | Else |
| 0082 | strLine = strLine & "" & Last_Line & ", " |
| 0083 | End If |
| 0084 | This_Object_Count = This_Object_Count + 1 |
| 0085 | Else |
| 0086 | If Last_Object <> "zzzz" Then |
| 0087 | If This_Object_Count = 1 Then |
| 0088 | strLine = "" & Last_Object & " (From Line " & Last_Line & ")" |
| 0089 | Else |
| 0090 | strLine = strLine & "" & Last_Line & ")" |
| 0091 | End If |
| 0092 | tsTextFile.WriteLine strLine |
| 0093 | End If |
| 0094 | This_Object_Count = 1 |
| 0095 | End If |
| 0096 | rsTableToRead2.MoveNext |
| 0097 | Last_Location = This_Location |
| 0098 | Last_Object = This_Object |
| 0099 | Last_Line = This_Line |
| 0100 | Loop |
| 0101 | 'Last line |
| 0102 | If Last_Object <> "zzzz" Then |
| 0103 | If This_Object_Count = 1 Then |
| 0104 | strLine = "" & Last_Object & " (From Line " & Last_Line & ")" |
| 0105 | Else |
| 0106 | strLine = strLine & "" & Last_Line & ")" |
| 0107 | End If |
| 0108 | tsTextFile.WriteLine strLine |
| 0109 | End If |
| 0110 | strLine = "" |
| 0111 | tsTextFile.WriteLine strLine |
| 0112 | End If |
| 0113 | 'Create link to top of page |
| 0114 | strLine = "Go To Top of This Page " |
| 0115 | tsTextFile.WriteLine strLine |
| 0116 | 'Create link to main code jump-table |
| 0117 | strLine = "Link to VBA Code Control Page " |
| 0118 | tsTextFile.WriteLine strLine |
| 0119 | 'Rule off ready for next procedure |
| 0120 | strLine = "
" |
| 0121 | tsTextFile.WriteLine strLine |
| 0122 | rsTableToRead.MoveNext |
| 0123 | Loop |
| 0124 | 'Finish File |
| 0125 | 'Page Footer |
| 0126 | strControlQuery = "SELECT Website_Control.Line_Value FROM Website_Control WHERE (((Website_Control.Web_Page) = """ & strControlTable & """) And ((Website_Control.Section) = ""Footer"")) ORDER BY Website_Control.Line;" |
| 0127 | Set rsTableControl = CurrentDb.OpenRecordset(strControlQuery) |
| 0128 | rsTableControl.MoveFirst |
| 0129 | Do While Not rsTableControl.EOF |
| 0130 | strLine = rsTableControl.Fields(0) |
| 0131 | OK = Replace_Timestamp(strLine) |
| 0132 | tsTextFile.WriteLine strLine |
| 0133 | rsTableControl.MoveNext |
| 0134 | Loop |
| 0135 | 'Copy to Transfer |
| 0136 | strFileSuffix = strOutputFileShort |
| 0137 | OK = CopyToTransfer(strFolder, strFileSuffix & ".htm") |
| 0138 | End Sub |