| Line-No. / Ref. | Code Line |
| 0001 | Public Sub Monthly_Report_Note1010_Update() |
| 0002 | Dim strLine As String |
| 0003 | Dim rsTableControl As Recordset |
| 0004 | Dim rsTableControl2 As Recordset |
| 0005 | Dim rsTableToRead As Recordset |
| 0006 | Dim strQuery As String |
| 0007 | Dim strControlQuery As String |
| 0008 | Dim i As Long |
| 0009 | Dim j As Integer |
| 0010 | Dim ifields As Integer |
| 0011 | Dim Field_Width As Single |
| 0012 | Dim Field_Width_Temp As Single |
| 0013 | Dim Alignment As String |
| 0014 | Dim Field_Temp As String |
| 0015 | Dim Columns(20) |
| 0016 | Dim TotalLen As Integer |
| 0017 | Dim TestLen As Integer |
| 0018 | Dim Hyperlink As String |
| 0019 | Dim RunStartTime As Double |
| 0020 | Dim Column_Total As Single |
| 0021 | RunStartTime = Now() |
| 0022 | 'Refresh the table Website_Regen_Control table |
| 0023 | DoCmd.RunSQL ("DELETE * FROM Website_Regen_Control;") |
| 0024 | strControlQuery = "INSERT INTO Website_Regen_Control ( Division, Last_Run, Regen_Mins, Title, Sequence, Link ) SELECT ""BookPaperControl"" AS Division, Min(BookPaperControl.Latest_Update) AS Last_Run, Sum(BookPaperControl.Time_To_Regenerate) AS Regen_Mins, ""BookPaperControl"" AS Title, 4 AS Sequence, ""BookPapers"" AS Link FROM BookPaperControl WHERE (((BookPaperControl.[Page Title]) <> ""Website-Generator Documentation (Bridge)"" And (BookPaperControl.[Page Title]) <> ""Website: Maintenance Dashboard"" And (BookPaperControl.[Page Title]) <> ""Books - Recent Purchases"")) GROUP BY ""BookPaperControl"", ""Book-Papers"", 4, ""BookPapers"";" |
| 0025 | DoCmd.RunSQL (strControlQuery) |
| 0026 | strControlQuery = "INSERT INTO Website_Regen_Control ( Division, Last_Run, Regen_Mins, Title, Sequence, Link ) SELECT ""Author_Letters"" AS Division, Min(Author_Letters.Latest_Author_Letter_Update) AS Last_Run, Sum(Author_Letters.Time_To_Regenerate) AS Regen_Mins, ""Authors"" AS Title, 1 AS Sequence, ""Authors"" AS Link FROM Author_Letters GROUP BY ""Author_Letters"", ""Authors"", 1, ""Authors"";" |
| 0027 | DoCmd.RunSQL (strControlQuery) |
| 0028 | strControlQuery = "INSERT INTO Website_Regen_Control ( Division, Last_Run, Regen_Mins, Title, Sequence, Link ) SELECT ""Book_Summary_Ranges"" AS Division, Min(Book_Summary_Ranges.Latest_Book_Range_Update) AS Last_Run, Sum(Book_Summary_Ranges.Time_To_Regenerate) AS Regen_Mins, ""Book Summaries"" AS Title, 2 AS Sequence, ""BookSummaries"" AS Link FROM Book_Summary_Ranges GROUP BY ""Book_Summary_Ranges"", ""Book Summaries"", 2, ""BookSummaries"";" |
| 0029 | DoCmd.RunSQL (strControlQuery) |
| 0030 | strControlQuery = "INSERT INTO Website_Regen_Control ( Division, Last_Run, Regen_Mins, Title, Sequence, Link ) SELECT ""Paper_Summary_Ranges"" AS Division, Min(Paper_Summary_Ranges.Latest_Paper_Range_Update) AS Last_Run, Sum(Paper_Summary_Ranges.Time_To_Regenerate) AS Regen_Mins, ""Paper Summaries"" AS Title, 10 AS Sequence, ""PaperSummaries"" AS Link FROM Paper_Summary_Ranges GROUP BY ""Paper_Summary_Ranges"", ""Paper Summaries"", 10, ""PaperSummaries"";" |
| 0031 | DoCmd.RunSQL (strControlQuery) |
| 0032 | strControlQuery = "INSERT INTO Website_Regen_Control ( Division, Last_Run, Regen_Mins, Title, Sequence, Link ) SELECT ""BookPaperLinks_Ranges"" AS Division, Min(BookPaperLinks_Ranges.Latest_Book_Range_Update) AS Last_Run, Sum(BookPaperLinks_Ranges.Time_To_Regenerate) AS Regen_Mins, ""Book-Paper Link Summaries"" AS Title, 5 AS Sequence, ""BookPaperLinkSummaries"" AS Link FROM BookPaperLinks_Ranges GROUP BY ""BookPaperLinks_Ranges"", ""Book-Paper Link Summaries"", 5, ""BookPaperLinkSummaries"";" |
| 0033 | DoCmd.RunSQL (strControlQuery) |
| 0034 | strControlQuery = "INSERT INTO Website_Regen_Control ( Division, Last_Run, Regen_Mins, Title, Sequence, Link ) SELECT ""BookPaperAbstract_Ranges"" AS Division, Min(BookPaperAbstract_Ranges.Latest_Book_Range_Update) AS Last_Run, Sum(BookPaperAbstract_Ranges.Time_To_Regenerate) AS Regen_Mins, ""Book-Paper Abstracts"" AS Title, 3 AS Sequence, ""BookPaperAbstracts"" AS Link FROM BookPaperAbstract_Ranges GROUP BY ""BookPaperAbstract_Ranges"", ""Book-Paper Abstracts"", 3, ""BookPaperAbstracts"";" |
| 0035 | DoCmd.RunSQL (strControlQuery) |
| 0036 | strControlQuery = "INSERT INTO Website_Regen_Control ( Division, Last_Run, Regen_Mins, Title, Sequence, Link ) SELECT ""Paper_Abstract_Ranges"" AS Division, Min(Paper_Abstract_Ranges.Latest_Paper_Range_Update) AS Last_Run, Sum(Paper_Abstract_Ranges.Time_To_Regenerate) AS Regen_Mins, ""Paper Abstracts"" AS Title, 9 AS Sequence, ""PaperAbstracts"" AS Link FROM Paper_Abstract_Ranges GROUP BY ""Paper_Abstract_Ranges"", ""Paper Abstracts"", 9, ""PaperAbstracts"";" |
| 0037 | DoCmd.RunSQL (strControlQuery) |
| 0038 | strControlQuery = "INSERT INTO Website_Regen_Control ( Division, Last_Run, Regen_Mins, Title, Sequence, Link ) SELECT ""Note_Regen_Ranges"" AS Division, Min(Note_Regen_Ranges.Latest_Note_Range_Update) AS Last_Run, Sum(Note_Regen_Ranges.Time_To_Regenerate) AS Regen_Mins, ""Notes"" AS Title, 6 AS Sequence, ""Notes"" AS Link FROM Note_Regen_Ranges GROUP BY ""Note_Regen_Ranges"", ""Notes"", 6, ""Notes"";" |
| 0039 | DoCmd.RunSQL (strControlQuery) |
| 0040 | strControlQuery = "INSERT INTO Website_Regen_Control ( Division, Last_Run, Regen_Mins, Title, Sequence, Link ) SELECT ""Note_Archive_Regen_Ranges"" AS Division, Min(Note_Archive_Regen_Ranges.Latest_Note_Range_Update) AS Last_Run, Sum(Note_Archive_Regen_Ranges.Time_To_Regenerate) AS Regen_Mins, ""Notes Archive"" AS Title, 8 AS Sequence, ""NotesArchive"" AS Link FROM Note_Archive_Regen_Ranges GROUP BY ""Note_Archive_Regen_Ranges"", ""Notes Archive"", 8, ""NotesArchive"";" |
| 0041 | DoCmd.RunSQL (strControlQuery) |
| 0042 | strControlQuery = "INSERT INTO Website_Regen_Control ( Division, Last_Run, Regen_Mins, Title, Sequence, Link ) SELECT ""Note_Group_Concatenation"" AS Division, Min(Note_Groups.Latest_Concatenation) AS Last_Run, Sum(Note_Groups.Time_To_Concatenate) AS Regen_Mins, ""Concatenated Notes"" AS Title, 7 AS Sequence, ""ConcatenatedNotes"" AS Link FROM Note_Groups GROUP BY ""Note_Group_Concatenation"", ""Concatenated Notes"", 7, ""ConcatenatedNotes"";" |
| 0043 | DoCmd.RunSQL (strControlQuery) |
| 0044 | For i = 0 To 20 |
| 0045 | Columns(i) = 0 |
| 0046 | Next i |
| 0047 | strLine = " This page contains control-tables indicating when the various segments of the website have been regenerated. Manual updates of individual pages are made all the time, and cross-reference links are maintained daily by automatic processes. The triggers for the regeneration of some pages are manual, others are automatic. However, it is inefficient to regenerate everything affected by a change in real time, and regenerating the whole site takes well over a day to run, so I only carry it out once a month. The tables below indicate what was generated when. But first, a few other useful links:- " |
| 0048 | strLine = strLine & "|99|" |
| 0049 | strLine = strLine & "|1|For a list of Frequently Accessed Pages on my website follow this Link. " |
| 0050 | strLine = strLine & "|1|For a full list of Archived Notes follow this Link. The purpose of this page is to allow me easily to see which archived notes are superfluous, so I can delete them." |
| 0051 | strLine = strLine & "|1|For lists of External Links from my site, follow this Link. I am in the process of using these lists to check the links, correcting (where possible) those that are broken." |
| 0052 | strLine = strLine & "|1|[Follow this link]++1256++ for a Note that lists those Notes and Papers (and maybe in the future other objects – Books & Authors) that have incorrect links to other Notes, using the ""quadruple plus"" mark-up to an invalid Note Title. The page should be empty. " |
| 0053 | strLine = strLine & "|1|[Follow this link]++874++ for the Test page showing the results of the latest run to automatically hyperlink objects on the database using Key-Words. " |
| 0054 | strLine = strLine & "|1|[Follow this link]++981++ for the latest Log of Outstanding Developments for my website. " |
| 0055 | strLine = strLine & "|99|
" |
| 0056 | strLine = strLine & "For want of a better home, I list here a number of shortcuts I can give out to interested parties for my various major pages:- |99|" |
| 0057 | strLine = strLine & "|1|http://www.theotodman.com/Aeon.htm" |
| 0058 | strLine = strLine & "|1|http://www.theotodman.com/Bach.htm" |
| 0059 | strLine = strLine & "|1|http://www.theotodman.com/Blog.htm" |
| 0060 | strLine = strLine & "|1|http://www.theotodman.com/Bridge.htm" |
| 0061 | strLine = strLine & "|1|http://www.theotodman.com/Chess.htm" |
| 0062 | strLine = strLine & "|1|http://www.theotodman.com/CoxesFarm.htm" |
| 0063 | strLine = strLine & "|1|http://www.theotodman.com/Family.htm" |
| 0064 | strLine = strLine & "|1|http://www.theotodman.com/Henry.htm" |
| 0065 | strLine = strLine & "|1|http://www.theotodman.com/HuttonUnion.htm" |
| 0066 | strLine = strLine & "|1|http://www.theotodman.com/Language.htm" |
| 0067 | strLine = strLine & "|1|http://www.theotodman.com/MountnessingAndFriends.htm" |
| 0068 | strLine = strLine & "|1|http://www.theotodman.com/Music.htm" |
| 0069 | strLine = strLine & "|1|http://www.theotodman.com/Personal.htm" |
| 0070 | strLine = strLine & "|1|http://www.theotodman.com/Philosophy.htm" |
| 0071 | strLine = strLine & "|1|http://www.theotodman.com/QuarterlyReport.htm" |
| 0072 | strLine = strLine & "|1|http://www.theotodman.com/TaskListQTD.htm" |
| 0073 | strLine = strLine & "|1|http://www.theotodman.com/TaskListYTD.htm" |
| 0074 | strLine = strLine & "|1|http://www.theotodman.com/Thesis.htm" |
| 0075 | strLine = strLine & "|1|http://www.theotodman.com/ThesisIntro.htm" |
| 0076 | strLine = strLine & "|1|http://www.theotodman.com/ThesisStance.htm" |
| 0077 | strLine = strLine & "|1|http://www.theotodman.com/ToDoList.htm" |
| 0078 | strLine = strLine & "|1|http://www.theotodman.com/Websites.htm" |
| 0079 | strLine = strLine & "|99|
" |
| 0080 | Column_Total = 0 |
| 0081 | strLine = strLine & "Table of Sub-Reports" |
| 0082 | strLine = strLine & "This page shows the following tables:-" |
| 0083 | strLine = strLine & "
" |
| 0084 | strQuery = "SELECT Website_Regen_Control.Link, Website_Regen_Control.Title AS [Title & Link], Website_Regen_Control.Last_Run AS [Last Regenerated], Int(Now()-[Last Regenerated]) AS [Days Ago], Website_Regen_Control.Regen_Mins AS [Time Taken] FROM Website_Regen_Control ORDER BY Website_Regen_Control.Sequence;" |
| 0085 | Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery) |
| 0086 | rsTableControl2.MoveFirst |
| 0087 | ifields = rsTableControl2.Fields.Count |
| 0088 | For i = 0 To ifields - 1 |
| 0089 | Columns(i) = Len(rsTableControl2.Fields(i).Name) |
| 0090 | Next i |
| 0091 | Do Until rsTableControl2.EOF |
| 0092 | For i = 0 To ifields - 1 |
| 0093 | TestLen = Len(rsTableControl2.Fields(i) & "") |
| 0094 | If TestLen > Columns(i) Then |
| 0095 | Columns(i) = TestLen |
| 0096 | End If |
| 0097 | Next i |
| 0098 | rsTableControl2.MoveNext |
| 0099 | Loop |
| 0100 | TotalLen = 0 |
| 0101 | For i = 0 To 20 |
| 0102 | If i <> 0 Then 'Ignore the Link column |
| 0103 | TotalLen = TotalLen + Columns(i) |
| 0104 | End If |
| 0105 | Next i |
| 0106 | Field_Width = 100 / TotalLen |
| 0107 | rsTableControl2.MoveFirst |
| 0108 | strLine = strLine & ""
| 0109 | 'Table Headers |
| 0110 | strLine = strLine & ""
| 0111 | j = 0 |
| 0112 | Do While j < ifields |
| 0113 | If j <> 0 Then 'Ignore the Link column |
| 0114 | Alignment = "Left" |
| 0115 | Field_Temp = rsTableControl2.Fields(j) & "" |
| 0116 | Field_Width_Temp = Field_Width * Columns(j) |
| 0117 | strLine = strLine & "| " & rsTableControl2.Fields(j).Name & " | " |
| 0118 | End If |
| 0119 | j = j + 1 |
| 0120 | Loop |
| 0121 | strLine = strLine & " | " |
| 0122 | 'Table Rows |
| 0123 | Do Until rsTableControl2.EOF |
| 0124 | strLine = strLine & ""
| 0125 | j = 0 |
| 0126 | Do While j < ifields |
| 0127 | If j = 0 Then |
| 0128 | Hyperlink = IIf(Len(rsTableControl2.Fields(j) & "") = 0, ".", rsTableControl2(j)) 'Save for hyperlinking later |
| 0129 | Else |
| 0130 | Alignment = "Left" |
| 0131 | Field_Temp = IIf(Len(rsTableControl2.Fields(j) & "") = 0, ".", rsTableControl2(j)) |
| 0132 | Field_Width_Temp = Field_Width * Columns(j) |
| 0133 | If j = 1 And Hyperlink <> "." Then |
| 0134 | strLine = strLine & "| " & "" & rsTableControl2.Fields(j) & " | " |
| 0135 | Else |
| 0136 | If j = 4 Then |
| 0137 | Column_Total = Column_Total + rsTableControl2.Fields(j) |
| 0138 | If Field_Temp < 60 Then |
| 0139 | Field_Temp = Field_Temp & " minutes" |
| 0140 | Else |
| 0141 | Field_Temp = Round(Field_Temp / 60, 2) & " hours" |
| 0142 | End If |
| 0143 | strLine = strLine & "| " & Field_Temp & " | " |
| 0144 | Else |
| 0145 | strLine = strLine & "| " & rsTableControl2.Fields(j) & " | " |
| 0146 | End If |
| 0147 | End If |
| 0148 | End If |
| 0149 | j = j + 1 |
| 0150 | Loop |
| 0151 | strLine = strLine & " | " |
| 0152 | rsTableControl2.MoveNext |
| 0153 | Loop |
| 0154 | 'Total |
| 0155 | strLine = strLine & "| | | | " & Round(Column_Total / 60, 2) & " hours | " |
| 0156 | 'Footer |
| 0157 | strLine = strLine & " |
" |
| 0158 | strLine = strLine & "In the above table, the time the routine takes to create the page-set in question is given (for my own purposes). Most of these routines are now taking far too long and now approximate " & Round(Column_Total / 60, 0) & " hours in total, so require investigation. ""Days Ago"" shows how many days prior to the production of this page (which was on " & Left(Now(), 10) & " at " & Right(Now(), 8) & ") the indicated page-set was produced." |
| 0159 | strLine = strLine & "
" |
| 0160 | 'Table 1 |
| 0161 | Column_Total = 0 |
| 0162 | strLine = strLine & "Book / Paper (etc) Lists " |
| 0163 | strLine = strLine & "This table lists the collections of Books and Philosophy Papers in my collection, with special emphasis on those related to my Thesis on ""Personal Identity"":-" |
| 0164 | strLine = strLine & "
" |
| 0165 | strQuery = "SELECT BookPaperControl.Link, BookPaperControl.[Page Title] AS [Page Title & Link], BookPaperControl.Latest_Update AS [Last Update], Int(Now()-[Latest_Update]) AS [Days Ago], BookPaperControl.Time_To_Regenerate AS [Minutes to Regenerate] FROM BookPaperControl ORDER BY BookPaperControl.[Page Title];" |
| 0166 | Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery) |
| 0167 | rsTableControl2.MoveFirst |
| 0168 | ifields = rsTableControl2.Fields.Count |
| 0169 | For i = 0 To ifields - 1 |
| 0170 | Columns(i) = Len(rsTableControl2.Fields(i).Name) |
| 0171 | Next i |
| 0172 | Do Until rsTableControl2.EOF |
| 0173 | For i = 0 To ifields - 1 |
| 0174 | TestLen = Len(rsTableControl2.Fields(i) & "") |
| 0175 | If TestLen > Columns(i) Then |
| 0176 | Columns(i) = TestLen |
| 0177 | End If |
| 0178 | Next i |
| 0179 | rsTableControl2.MoveNext |
| 0180 | Loop |
| 0181 | TotalLen = 0 |
| 0182 | For i = 0 To 20 |
| 0183 | If i <> 0 Then 'Ignore the Link column |
| 0184 | TotalLen = TotalLen + Columns(i) |
| 0185 | End If |
| 0186 | Next i |
| 0187 | Field_Width = 100 / TotalLen |
| 0188 | rsTableControl2.MoveFirst |
| 0189 | strLine = strLine & ""
| 0190 | 'Table Headers |
| 0191 | strLine = strLine & ""
| 0192 | j = 0 |
| 0193 | Do While j < ifields |
| 0194 | If j <> 0 Then 'Ignore the Link column |
| 0195 | Alignment = "Left" |
| 0196 | Field_Temp = rsTableControl2.Fields(j) |
| 0197 | Field_Width_Temp = Field_Width * Columns(j) |
| 0198 | strLine = strLine & "| " & rsTableControl2.Fields(j).Name & " | " |
| 0199 | End If |
| 0200 | j = j + 1 |
| 0201 | Loop |
| 0202 | strLine = strLine & " | " |
| 0203 | 'Table Rows |
| 0204 | Do Until rsTableControl2.EOF |
| 0205 | strLine = strLine & ""
| 0206 | j = 0 |
| 0207 | Do While j < ifields |
| 0208 | If j = 0 Then |
| 0209 | Hyperlink = IIf(Len(rsTableControl2.Fields(j) & "") = 0, ".", rsTableControl2(j)) 'Save for hyperlinking later |
| 0210 | Else |
| 0211 | Alignment = "Left" |
| 0212 | Field_Temp = IIf(Len(rsTableControl2.Fields(j) & "") = 0, ".", rsTableControl2(j)) |
| 0213 | Field_Width_Temp = Field_Width * Columns(j) |
| 0214 | If j = 1 And Hyperlink <> "." Then |
| 0215 | strLine = strLine & "| " & "" & rsTableControl2.Fields(j) & " | " |
| 0216 | Else |
| 0217 | strLine = strLine & "| " & rsTableControl2.Fields(j) & " | " |
| 0218 | End If |
| 0219 | End If |
| 0220 | If j = 4 Then |
| 0221 | Column_Total = Column_Total + rsTableControl2.Fields(j) |
| 0222 | End If |
| 0223 | j = j + 1 |
| 0224 | Loop |
| 0225 | strLine = strLine & " | " |
| 0226 | rsTableControl2.MoveNext |
| 0227 | Loop |
| 0228 | 'Total |
| 0229 | strLine = strLine & "| | | | " & Round(Column_Total / 60, 2) & " hours | " |
| 0230 | 'Footer |
| 0231 | strLine = strLine & " |
" |
| 0232 | strLine = strLine & "In the above table, the time the routine takes to create the page in question is given (for my own purposes). All the routines are acceptably quick. ""Days Ago"" shows how many days prior to the production of this page (which was on " & Left(Now(), 10) & " at " & Right(Now(), 8) & ") the indicated page was produced." |
| 0233 | strLine = strLine & "
" |
| 0234 | 'Table 2: Author Lists |
| 0235 | strLine = strLine & "Lists of Works by Particular Authors " |
| 0236 | strLine = strLine & "This table lists the collections of Books and Philosophy Papers in my collection, organised by Author:-" |
| 0237 | strLine = strLine & "
" |
| 0238 | strQuery = "SELECT Author_Letters.Author_Letter AS [Author Letter], Author_Letters.Latest_Author_Letter_Update AS [Last Update], Int(Now()-[Last Update]) AS [Days Ago], Author_Letters.Time_To_Regenerate AS [Minutes To Regenerate], ""Sample"" AS Sample FROM Author_Letters ORDER BY Author_Letters.Author_Letter;" |
| 0239 | Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery) |
| 0240 | Column_Total = 0 |
| 0241 | rsTableControl2.MoveFirst |
| 0242 | ifields = rsTableControl2.Fields.Count |
| 0243 | For i = 0 To ifields - 1 |
| 0244 | Columns(i) = Len(rsTableControl2.Fields(i).Name) |
| 0245 | Next i |
| 0246 | Do Until rsTableControl2.EOF |
| 0247 | For i = 0 To ifields - 1 |
| 0248 | TestLen = Len(rsTableControl2.Fields(i) & "") |
| 0249 | If TestLen > Columns(i) Then |
| 0250 | Columns(i) = TestLen |
| 0251 | End If |
| 0252 | Next i |
| 0253 | rsTableControl2.MoveNext |
| 0254 | Loop |
| 0255 | TotalLen = 0 |
| 0256 | For i = 0 To 20 |
| 0257 | TotalLen = TotalLen + Columns(i) |
| 0258 | Next i |
| 0259 | Field_Width = 100 / TotalLen |
| 0260 | rsTableControl2.MoveFirst |
| 0261 | strLine = strLine & ""
| 0262 | 'Table Headers |
| 0263 | strLine = strLine & ""
| 0264 | j = 0 |
| 0265 | Do While j < ifields |
| 0266 | Alignment = "Left" |
| 0267 | Field_Temp = rsTableControl2.Fields(j) |
| 0268 | Field_Width_Temp = Field_Width * Columns(j) |
| 0269 | strLine = strLine & "| " & rsTableControl2.Fields(j).Name & " | " |
| 0270 | j = j + 1 |
| 0271 | Loop |
| 0272 | strLine = strLine & " | " |
| 0273 | 'Table Rows |
| 0274 | Do Until rsTableControl2.EOF |
| 0275 | strLine = strLine & ""
| 0276 | j = 0 |
| 0277 | Do While j < ifields |
| 0278 | Alignment = "Left" |
| 0279 | Field_Temp = IIf(Len(rsTableControl2.Fields(j) & "") = 0, ".", rsTableControl2(j)) |
| 0280 | Field_Width_Temp = Field_Width * Columns(j) |
| 0281 | If j = ifields - 1 Then |
| 0282 | strQuery = "SELECT Authors_List_Authors.Author_Name FROM Authors_List_Authors WHERE (((Left([Author_Name], 1)) >= """ & rsTableControl2.Fields(0) & """)) ORDER BY Authors_List_Authors.Author_Name;" |
| 0283 | Set rsTableToRead = CurrentDb.OpenRecordset(strQuery) |
| 0284 | rsTableToRead.MoveFirst |
| 0285 | Hyperlink = rsTableControl2.Fields(0) & "/Author_" & rsTableToRead.Fields(0) & ".htm" |
| 0286 | strLine = strLine & "| " & "" & rsTableControl2.Fields(j) & " | " |
| 0287 | Else |
| 0288 | strLine = strLine & "| " & rsTableControl2.Fields(j) & " | " |
| 0289 | End If |
| 0290 | If j = 3 Then |
| 0291 | Column_Total = Column_Total + rsTableControl2.Fields(j) |
| 0292 | End If |
| 0293 | j = j + 1 |
| 0294 | Loop |
| 0295 | strLine = strLine & " | " |
| 0296 | rsTableControl2.MoveNext |
| 0297 | Loop |
| 0298 | 'Total |
| 0299 | strLine = strLine & "| | | | " & Round(Column_Total / 60, 2) & " hours | | " |
| 0300 | 'Footer |
| 0301 | strLine = strLine & " |
" |
| 0302 | strLine = strLine & "In the above table, the time the routine takes to create the page in question is given (for my own purposes). ""Days Ago"" shows how many days prior to the production of this page (which was on " & Left(Now(), 10) & " at " & Right(Now(), 8) & ") the indicated page was produced." |
| 0303 | strLine = strLine & "
" |
| 0304 | 'Table 3: Book Summaries |
| 0305 | strLine = strLine & "Lists of Book Summaries " |
| 0306 | strLine = strLine & "This table lists the Summaries of the Books in my collection, banded by ranges of internal ID. In principle, these pages change individually when anything relevant changes, but in case not, I regenerate the lot from time to time:-" |
| 0307 | strLine = strLine & "
" |
| 0308 | strQuery = "SELECT Book_Summary_Ranges.ID_Start AS [Start ID], Book_Summary_Ranges.ID_End AS [End ID], Book_Summary_Ranges.Latest_Book_Range_Update AS [Last Update], Int(Now()-[Latest_Book_Range_Update]) AS [Days Ago], Book_Summary_Ranges.Time_To_Regenerate AS [Minutes To Regenerate], ""Sample"" AS Sample FROM Book_Summary_Ranges ORDER BY Book_Summary_Ranges.ID_Start;" |
| 0309 | Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery) |
| 0310 | rsTableControl2.MoveFirst |
| 0311 | ifields = rsTableControl2.Fields.Count |
| 0312 | For i = 0 To ifields - 1 |
| 0313 | Columns(i) = Len(rsTableControl2.Fields(i).Name) |
| 0314 | Next i |
| 0315 | Do Until rsTableControl2.EOF |
| 0316 | For i = 0 To ifields - 1 |
| 0317 | TestLen = Len(rsTableControl2.Fields(i) & "") |
| 0318 | If TestLen > Columns(i) Then |
| 0319 | Columns(i) = TestLen |
| 0320 | End If |
| 0321 | Next i |
| 0322 | rsTableControl2.MoveNext |
| 0323 | Loop |
| 0324 | TotalLen = 0 |
| 0325 | Column_Total = 0 |
| 0326 | For i = 0 To 20 |
| 0327 | TotalLen = TotalLen + Columns(i) |
| 0328 | Next i |
| 0329 | Field_Width = 100 / TotalLen |
| 0330 | rsTableControl2.MoveFirst |
| 0331 | strLine = strLine & ""
| 0332 | 'Table Headers |
| 0333 | strLine = strLine & ""
| 0334 | j = 0 |
| 0335 | Do While j < ifields |
| 0336 | Alignment = "Left" |
| 0337 | Field_Temp = rsTableControl2.Fields(j) |
| 0338 | Field_Width_Temp = Field_Width * Columns(j) |
| 0339 | strLine = strLine & "| " & rsTableControl2.Fields(j).Name & " | " |
| 0340 | j = j + 1 |
| 0341 | Loop |
| 0342 | strLine = strLine & " | " |
| 0343 | 'Table Rows |
| 0344 | Do Until rsTableControl2.EOF |
| 0345 | strLine = strLine & ""
| 0346 | j = 0 |
| 0347 | Do While j < ifields |
| 0348 | Alignment = "Left" |
| 0349 | Field_Temp = IIf(Len(rsTableControl2.Fields(j) & "") = 0, ".", rsTableControl2(j)) |
| 0350 | Field_Width_Temp = Field_Width * Columns(j) |
| 0351 | If j = ifields - 1 Then |
| 0352 | strQuery = "SELECT Books.ID1 FROM Books WHERE (((Books.ID1)>=" & rsTableControl2.Fields(0) & ")) ORDER BY ID1;" |
| 0353 | Set rsTableToRead = CurrentDb.OpenRecordset(strQuery) |
| 0354 | If Not rsTableToRead.EOF Then |
| 0355 | rsTableToRead.MoveFirst |
| 0356 | Hyperlink = Mid(rsTableControl2.Fields(0) + 100000, 2, 2) & "/BookSummary_" & rsTableToRead.Fields(0) & ".htm" |
| 0357 | strLine = strLine & "| " & "" & rsTableControl2.Fields(j) & " | " |
| 0358 | Else |
| 0359 | strLine = strLine & "| " & "N/A | " |
| 0360 | End If |
| 0361 | Else |
| 0362 | strLine = strLine & "| " & rsTableControl2.Fields(j) & " | " |
| 0363 | End If |
| 0364 | If j = 4 Then |
| 0365 | Column_Total = Column_Total + Nz(rsTableControl2.Fields(j)) |
| 0366 | End If |
| 0367 | j = j + 1 |
| 0368 | Loop |
| 0369 | strLine = strLine & " | " |
| 0370 | rsTableControl2.MoveNext |
| 0371 | Loop |
| 0372 | 'Total |
| 0373 | strLine = strLine & "| | | | | " & Round(Column_Total / 60, 2) & " hours | | " |
| 0374 | 'Footer |
| 0375 | strLine = strLine & " |
" |
| 0376 | strLine = strLine & "In the above table, the time the routine takes to create the range of pages in question is given (for my own purposes). ""Days Ago"" shows how many days prior to the production of this page (which was on " & Left(Now(), 10) & " at " & Right(Now(), 8) & ") the indicated page was produced." |
| 0377 | strLine = strLine & "
" |
| 0378 | 'Table 4: Paper Summaries |
| 0379 | strLine = strLine & "Lists of Paper Summaries " |
| 0380 | strLine = strLine & "This table lists the Summaries of the Papers in my collection, banded by ranges of internal ID. In principle, these pages change individually when anything relevant changes, but in case not, I regenerate the lot from time to time:-" |
| 0381 | strLine = strLine & "
" |
| 0382 | strQuery = "SELECT Paper_Summary_Ranges.ID_Start AS [Start ID], Paper_Summary_Ranges.ID_End AS [End ID], Paper_Summary_Ranges.Latest_Paper_Range_Update AS [Last Update], Int(Now()-[Latest_Paper_Range_Update]) AS [Days Ago], Paper_Summary_Ranges.Time_To_Regenerate AS [Minutes To Regenerate], ""Sample"" AS Sample FROM Paper_Summary_Ranges ORDER BY Paper_Summary_Ranges.ID_Start;" |
| 0383 | Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery) |
| 0384 | rsTableControl2.MoveFirst |
| 0385 | ifields = rsTableControl2.Fields.Count |
| 0386 | For i = 0 To ifields - 1 |
| 0387 | Columns(i) = Len(rsTableControl2.Fields(i).Name) |
| 0388 | Next i |
| 0389 | Do Until rsTableControl2.EOF |
| 0390 | For i = 0 To ifields - 1 |
| 0391 | TestLen = Len(rsTableControl2.Fields(i) & "") |
| 0392 | If TestLen > Columns(i) Then |
| 0393 | Columns(i) = TestLen |
| 0394 | End If |
| 0395 | Next i |
| 0396 | rsTableControl2.MoveNext |
| 0397 | Loop |
| 0398 | TotalLen = 0 |
| 0399 | For i = 0 To 20 |
| 0400 | TotalLen = TotalLen + Columns(i) |
| 0401 | Next i |
| 0402 | Field_Width = 100 / TotalLen |
| 0403 | rsTableControl2.MoveFirst |
| 0404 | strLine = strLine & ""
| 0405 | Column_Total = 0 |
| 0406 | 'Table Headers |
| 0407 | strLine = strLine & ""
| 0408 | j = 0 |
| 0409 | Do While j < ifields |
| 0410 | Alignment = "Left" |
| 0411 | Field_Temp = rsTableControl2.Fields(j) |
| 0412 | Field_Width_Temp = Field_Width * Columns(j) |
| 0413 | strLine = strLine & "| " & rsTableControl2.Fields(j).Name & " | " |
| 0414 | j = j + 1 |
| 0415 | Loop |
| 0416 | strLine = strLine & " | " |
| 0417 | 'Table Rows |
| 0418 | Do Until rsTableControl2.EOF |
| 0419 | strLine = strLine & ""
| 0420 | j = 0 |
| 0421 | Do While j < ifields |
| 0422 | Alignment = "Left" |
| 0423 | Field_Temp = IIf(Len(rsTableControl2.Fields(j) & "") = 0, ".", rsTableControl2(j)) |
| 0424 | Field_Width_Temp = Field_Width * Columns(j) |
| 0425 | If j = ifields - 1 Then |
| 0426 | strQuery = "SELECT Papers.ID FROM Papers WHERE (((Papers.ID)>=" & rsTableControl2.Fields(0) & ")) ORDER BY ID;" |
| 0427 | Set rsTableToRead = CurrentDb.OpenRecordset(strQuery) |
| 0428 | rsTableToRead.MoveFirst |
| 0429 | Hyperlink = Mid(rsTableControl2.Fields(0) + 100000, 2, 2) & "/PaperSummary_" & rsTableToRead.Fields(0) & ".htm" |
| 0430 | strLine = strLine & "| " & "" & rsTableControl2.Fields(j) & " | " |
| 0431 | Else |
| 0432 | strLine = strLine & "| " & rsTableControl2.Fields(j) & " | " |
| 0433 | End If |
| 0434 | If j = 4 Then |
| 0435 | Column_Total = Column_Total + rsTableControl2.Fields(j) |
| 0436 | End If |
| 0437 | j = j + 1 |
| 0438 | Loop |
| 0439 | strLine = strLine & " | " |
| 0440 | rsTableControl2.MoveNext |
| 0441 | Loop |
| 0442 | 'Total |
| 0443 | strLine = strLine & "| | | | | " & Round(Column_Total / 60, 2) & " hours | | " |
| 0444 | 'Footer |
| 0445 | strLine = strLine & " |
" |
| 0446 | strLine = strLine & "In the above table, the time the routine takes to create the range of pages in question is given (for my own purposes). ""Days Ago"" shows how many days prior to the production of this page (which was on " & Left(Now(), 10) & " at " & Right(Now(), 8) & ") the indicated page was produced." |
| 0447 | strLine = strLine & "
" |
| 0448 | 'Table 5: Book-Paper Link Summaries |
| 0449 | strLine = strLine & "Lists of Book-Paper Link Summary pages " |
| 0450 | strLine = strLine & "This table lists the Summaries for each of the Books in my collection, of the Papers connected to it, banded by ranges of internal ID. In principle, these pages change individually when anything relevant changes, but in case not, I regenerate the lot from time to time:-" |
| 0451 | strLine = strLine & "
" |
| 0452 | strQuery = "SELECT BookPaperLinks_Ranges.ID_Start AS [Start ID], BookPaperLinks_Ranges.ID_End AS [End ID], BookPaperLinks_Ranges.Latest_Book_Range_Update AS [Last Update], Int(Now()-[Latest_Book_Range_Update]) AS [Days Ago], BookPaperLinks_Ranges.Time_To_Regenerate AS [Minutes To Regenerate], ""Sample"" AS Sample FROM BookPaperLinks_Ranges ORDER BY BookPaperLinks_Ranges.ID_Start;" |
| 0453 | Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery) |
| 0454 | rsTableControl2.MoveFirst |
| 0455 | ifields = rsTableControl2.Fields.Count |
| 0456 | For i = 0 To ifields - 1 |
| 0457 | Columns(i) = Len(rsTableControl2.Fields(i).Name) |
| 0458 | Next i |
| 0459 | Do Until rsTableControl2.EOF |
| 0460 | For i = 0 To ifields - 1 |
| 0461 | TestLen = Len(rsTableControl2.Fields(i) & "") |
| 0462 | If TestLen > Columns(i) Then |
| 0463 | Columns(i) = TestLen |
| 0464 | End If |
| 0465 | Next i |
| 0466 | rsTableControl2.MoveNext |
| 0467 | Loop |
| 0468 | TotalLen = 0 |
| 0469 | For i = 0 To 20 |
| 0470 | TotalLen = TotalLen + Columns(i) |
| 0471 | Next i |
| 0472 | Field_Width = 100 / TotalLen |
| 0473 | rsTableControl2.MoveFirst |
| 0474 | strLine = strLine & ""
| 0475 | Column_Total = 0 |
| 0476 | 'Table Headers |
| 0477 | strLine = strLine & ""
| 0478 | j = 0 |
| 0479 | Do While j < ifields |
| 0480 | Alignment = "Left" |
| 0481 | Field_Temp = rsTableControl2.Fields(j) |
| 0482 | Field_Width_Temp = Field_Width * Columns(j) |
| 0483 | strLine = strLine & "| " & rsTableControl2.Fields(j).Name & " | " |
| 0484 | j = j + 1 |
| 0485 | Loop |
| 0486 | strLine = strLine & " | " |
| 0487 | 'Table Rows |
| 0488 | Do Until rsTableControl2.EOF |
| 0489 | strLine = strLine & ""
| 0490 | j = 0 |
| 0491 | Do While j < ifields |
| 0492 | Alignment = "Left" |
| 0493 | Field_Temp = IIf(Len(rsTableControl2.Fields(j) & "") = 0, ".", rsTableControl2(j)) |
| 0494 | Field_Width_Temp = Field_Width * Columns(j) |
| 0495 | If j = ifields - 1 Then |
| 0496 | strQuery = "SELECT Books.ID1 FROM Books WHERE (((Books.ID1)>=" & rsTableControl2.Fields(0) & ")) ORDER BY ID1;" |
| 0497 | Set rsTableToRead = CurrentDb.OpenRecordset(strQuery) |
| 0498 | rsTableToRead.MoveFirst |
| 0499 | Hyperlink = Mid(rsTableControl2.Fields(0) + 100000, 2, 2) & "/BooksToPapers_" & rsTableToRead.Fields(0) & ".htm" |
| 0500 | strLine = strLine & "| " & "" & rsTableControl2.Fields(j) & " | " |
| 0501 | Else |
| 0502 | strLine = strLine & "| " & rsTableControl2.Fields(j) & " | " |
| 0503 | End If |
| 0504 | If j = 4 Then |
| 0505 | Column_Total = Column_Total + rsTableControl2.Fields(j) |
| 0506 | End If |
| 0507 | j = j + 1 |
| 0508 | Loop |
| 0509 | strLine = strLine & " | " |
| 0510 | rsTableControl2.MoveNext |
| 0511 | Loop |
| 0512 | 'Total |
| 0513 | strLine = strLine & "| | | | | " & Round(Column_Total / 60, 2) & " hours | | " |
| 0514 | 'Footer |
| 0515 | strLine = strLine & " |
" |
| 0516 | strLine = strLine & "In the above table, the time the routine takes to create the range of pages in question is given (for my own purposes). ""Days Ago"" shows how many days prior to the production of this page (which was on " & Left(Now(), 10) & " at " & Right(Now(), 8) & ") the indicated page was produced." |
| 0517 | strLine = strLine & "
" |
| 0518 | 'Table 6: Book-Paper Abstracts |
| 0519 | strLine = strLine & "Lists of Book-Paper Abstracts pages " |
| 0520 | strLine = strLine & "This table lists the Abstracts for each of the Books in my collection, together with those of the Papers connected to it, banded by ranges of internal ID. In principle, these pages change individually when anything relevant changes, but in case not, I regenerate the lot from time to time:-" |
| 0521 | strLine = strLine & "
" |
| 0522 | strQuery = "SELECT BookPaperAbstract_Ranges.ID_Start AS [Start ID], BookPaperAbstract_Ranges.ID_End AS [End ID], BookPaperAbstract_Ranges.Latest_Book_Range_Update AS [Last Update], Int(Now()-[Latest_Book_Range_Update]) AS [Days Ago], BookPaperAbstract_Ranges.Time_To_Regenerate AS [Minutes To Regenerate], ""Sample"" AS Sample FROM BookPaperAbstract_Ranges ORDER BY BookPaperAbstract_Ranges.ID_Start;" |
| 0523 | Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery) |
| 0524 | rsTableControl2.MoveFirst |
| 0525 | ifields = rsTableControl2.Fields.Count |
| 0526 | For i = 0 To ifields - 1 |
| 0527 | Columns(i) = Len(rsTableControl2.Fields(i).Name) |
| 0528 | Next i |
| 0529 | Do Until rsTableControl2.EOF |
| 0530 | For i = 0 To ifields - 1 |
| 0531 | TestLen = Len(rsTableControl2.Fields(i) & "") |
| 0532 | If TestLen > Columns(i) Then |
| 0533 | Columns(i) = TestLen |
| 0534 | End If |
| 0535 | Next i |
| 0536 | rsTableControl2.MoveNext |
| 0537 | Loop |
| 0538 | TotalLen = 0 |
| 0539 | For i = 0 To 20 |
| 0540 | TotalLen = TotalLen + Columns(i) |
| 0541 | Next i |
| 0542 | Field_Width = 100 / TotalLen |
| 0543 | rsTableControl2.MoveFirst |
| 0544 | strLine = strLine & ""
| 0545 | Column_Total = 0 |
| 0546 | 'Table Headers |
| 0547 | strLine = strLine & ""
| 0548 | j = 0 |
| 0549 | Do While j < ifields |
| 0550 | Alignment = "Left" |
| 0551 | Field_Temp = rsTableControl2.Fields(j) |
| 0552 | Field_Width_Temp = Field_Width * Columns(j) |
| 0553 | strLine = strLine & "| " & rsTableControl2.Fields(j).Name & " | " |
| 0554 | j = j + 1 |
| 0555 | Loop |
| 0556 | strLine = strLine & " | " |
| 0557 | 'Table Rows |
| 0558 | Do Until rsTableControl2.EOF |
| 0559 | strLine = strLine & ""
| 0560 | j = 0 |
| 0561 | Do While j < ifields |
| 0562 | Alignment = "Left" |
| 0563 | Field_Temp = IIf(Len(rsTableControl2.Fields(j) & "") = 0, ".", rsTableControl2(j)) |
| 0564 | Field_Width_Temp = Field_Width * Columns(j) |
| 0565 | If j = ifields - 1 Then |
| 0566 | strQuery = "SELECT Books.ID1 FROM Books WHERE (((Books.ID1)>=" & rsTableControl2.Fields(0) & ") AND (Books.Abstract_Quality & """" <> """")) ORDER BY ID1;" |
| 0567 | Set rsTableToRead = CurrentDb.OpenRecordset(strQuery) |
| 0568 | If rsTableToRead.EOF Then |
| 0569 | strLine = strLine & "| " & "N/A | " |
| 0570 | Else |
| 0571 | rsTableToRead.MoveFirst |
| 0572 | Hyperlink = Mid(rsTableControl2.Fields(0) + 100000, 2, 2) & "/BookPaperAbstracts/BookPaperAbstracts_" & rsTableToRead.Fields(0) & ".htm" |
| 0573 | strLine = strLine & "| " & "" & rsTableControl2.Fields(j) & " | " |
| 0574 | End If |
| 0575 | Else |
| 0576 | strLine = strLine & "| " & rsTableControl2.Fields(j) & " | " |
| 0577 | End If |
| 0578 | If j = 4 Then |
| 0579 | Column_Total = Column_Total + Nz(rsTableControl2.Fields(j)) |
| 0580 | End If |
| 0581 | j = j + 1 |
| 0582 | Loop |
| 0583 | strLine = strLine & " | " |
| 0584 | rsTableControl2.MoveNext |
| 0585 | Loop |
| 0586 | 'Total |
| 0587 | strLine = strLine & "| | | | | " & Round(Column_Total / 60, 2) & " hours | | " |
| 0588 | 'Footer |
| 0589 | strLine = strLine & " |
" |
| 0590 | strLine = strLine & "In the above table, the time the routine takes to create the range of pages in question is given (for my own purposes). ""Days Ago"" shows how many days prior to the production of this page (which was on " & Left(Now(), 10) & " at " & Right(Now(), 8) & ") the indicated page was produced." |
| 0591 | strLine = strLine & "
" |
| 0592 | 'Table 7: Paper Abstracts |
| 0593 | strLine = strLine & "Lists of Paper Abstracts pages " |
| 0594 | strLine = strLine & "This table lists the Abstracts for each of the Papers in my collection, banded by ranges of internal ID. In principle, these pages change individually when anything relevant changes, but in case not, I regenerate the lot from time to time:-" |
| 0595 | strLine = strLine & "
" |
| 0596 | strQuery = "SELECT Paper_Abstract_Ranges.ID_Start AS [Start ID], Paper_Abstract_Ranges.ID_End AS [End ID], Paper_Abstract_Ranges.Latest_Paper_Range_Update AS [Last Update], Int(Now()-[Latest_Paper_Range_Update]) AS [Days Ago], Paper_Abstract_Ranges.Time_To_Regenerate AS [Minutes To Regenerate], ""Sample"" AS Sample FROM Paper_Abstract_Ranges ORDER BY Paper_Abstract_Ranges.ID_Start;" |
| 0597 | Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery) |
| 0598 | rsTableControl2.MoveFirst |
| 0599 | ifields = rsTableControl2.Fields.Count |
| 0600 | For i = 0 To ifields - 1 |
| 0601 | Columns(i) = Len(rsTableControl2.Fields(i).Name) |
| 0602 | Next i |
| 0603 | Do Until rsTableControl2.EOF |
| 0604 | For i = 0 To ifields - 1 |
| 0605 | TestLen = Len(rsTableControl2.Fields(i) & "") |
| 0606 | If TestLen > Columns(i) Then |
| 0607 | Columns(i) = TestLen |
| 0608 | End If |
| 0609 | Next i |
| 0610 | rsTableControl2.MoveNext |
| 0611 | Loop |
| 0612 | TotalLen = 0 |
| 0613 | Column_Total = 0 |
| 0614 | For i = 0 To 20 |
| 0615 | TotalLen = TotalLen + Columns(i) |
| 0616 | Next i |
| 0617 | Field_Width = 100 / TotalLen |
| 0618 | rsTableControl2.MoveFirst |
| 0619 | strLine = strLine & ""
| 0620 | 'Table Headers |
| 0621 | strLine = strLine & ""
| 0622 | j = 0 |
| 0623 | Do While j < ifields |
| 0624 | Alignment = "Left" |
| 0625 | Field_Temp = rsTableControl2.Fields(j) |
| 0626 | Field_Width_Temp = Field_Width * Columns(j) |
| 0627 | strLine = strLine & "| " & rsTableControl2.Fields(j).Name & " | " |
| 0628 | j = j + 1 |
| 0629 | Loop |
| 0630 | strLine = strLine & " | " |
| 0631 | 'Table Rows |
| 0632 | Do Until rsTableControl2.EOF |
| 0633 | strLine = strLine & ""
| 0634 | j = 0 |
| 0635 | Do While j < ifields |
| 0636 | Alignment = "Left" |
| 0637 | Field_Temp = IIf(Len(rsTableControl2.Fields(j) & "") = 0, ".", rsTableControl2(j)) |
| 0638 | Field_Width_Temp = Field_Width * Columns(j) |
| 0639 | If j = ifields - 1 Then |
| 0640 | strQuery = "SELECT Papers.ID FROM Papers WHERE (((Papers.ID)>=" & rsTableControl2.Fields(0) & ") AND (Papers.Abstract_Quality & """" <> """")) ORDER BY ID;" |
| 0641 | Set rsTableToRead = CurrentDb.OpenRecordset(strQuery) |
| 0642 | If rsTableToRead.EOF Then |
| 0643 | strLine = strLine & "| " & "N/A | " |
| 0644 | Else |
| 0645 | rsTableToRead.MoveFirst |
| 0646 | Hyperlink = Mid(rsTableControl2.Fields(0) + 100000, 2, 2) & "/Abstract_" & rsTableToRead.Fields(0) & ".htm" |
| 0647 | strLine = strLine & "| " & "" & rsTableControl2.Fields(j) & " | " |
| 0648 | End If |
| 0649 | Else |
| 0650 | strLine = strLine & "| " & rsTableControl2.Fields(j) & " | " |
| 0651 | End If |
| 0652 | If j = 4 Then |
| 0653 | Column_Total = Column_Total + rsTableControl2.Fields(j) |
| 0654 | End If |
| 0655 | j = j + 1 |
| 0656 | Loop |
| 0657 | strLine = strLine & " | " |
| 0658 | rsTableControl2.MoveNext |
| 0659 | Loop |
| 0660 | 'Total |
| 0661 | strLine = strLine & "| | | | | " & Round(Column_Total / 60, 2) & " hours | | " |
| 0662 | 'Footer |
| 0663 | strLine = strLine & " |
" |
| 0664 | strLine = strLine & "In the above table, the time the routine takes to create the range of pages in question is given (for my own purposes). ""Days Ago"" shows how many days prior to the production of this page (which was on " & Left(Now(), 10) & " at " & Right(Now(), 8) & ") the indicated page was produced." |
| 0665 | strLine = strLine & "
" |
| 0666 | 'Table 8: Notes |
| 0667 | 'Regenerate the Notes List page |
| 0668 | Notes_List_Export |
| 0669 | strLine = strLine & "Lists of Notes pages " |
| 0670 | strLine = strLine & "This table lists the Notes in my database, banded by ranges of internal ID. These pages change individually when anything relevant changes, but in order to ensure the linkages between the various Notes pages and the rest of the database remain current, I regenerate the lot from time to time:-" |
| 0671 | strLine = strLine & "
" |
| 0672 | strQuery = "SELECT Note_Regen_Ranges.ID_Start AS [Start ID], Note_Regen_Ranges.ID_End AS [End ID], Note_Regen_Ranges.Latest_Note_Range_Update AS [Last Update], Int(Now()-[Latest_Note_Range_Update]) AS [Days Ago], Note_Regen_Ranges.Time_To_Regenerate AS [Minutes To Regenerate], ""Sample"" AS Sample FROM Note_Regen_Ranges ORDER BY Note_Regen_Ranges.ID_Start;" |
| 0673 | Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery) |
| 0674 | rsTableControl2.MoveFirst |
| 0675 | ifields = rsTableControl2.Fields.Count |
| 0676 | For i = 0 To ifields - 1 |
| 0677 | Columns(i) = Len(rsTableControl2.Fields(i).Name) |
| 0678 | Next i |
| 0679 | Do Until rsTableControl2.EOF |
| 0680 | For i = 0 To ifields - 1 |
| 0681 | TestLen = Len(rsTableControl2.Fields(i) & "") |
| 0682 | If TestLen > Columns(i) Then |
| 0683 | Columns(i) = TestLen |
| 0684 | End If |
| 0685 | Next i |
| 0686 | rsTableControl2.MoveNext |
| 0687 | Loop |
| 0688 | TotalLen = 0 |
| 0689 | For i = 0 To 20 |
| 0690 | TotalLen = TotalLen + Columns(i) |
| 0691 | Next i |
| 0692 | Column_Total = 0 |
| 0693 | Field_Width = 100 / TotalLen |
| 0694 | rsTableControl2.MoveFirst |
| 0695 | strLine = strLine & ""
| 0696 | 'Table Headers |
| 0697 | strLine = strLine & ""
| 0698 | j = 0 |
| 0699 | Do While j < ifields |
| 0700 | Alignment = "Left" |
| 0701 | Field_Temp = rsTableControl2.Fields(j) |
| 0702 | Field_Width_Temp = Field_Width * Columns(j) |
| 0703 | strLine = strLine & "| " & rsTableControl2.Fields(j).Name & " | " |
| 0704 | j = j + 1 |
| 0705 | Loop |
| 0706 | strLine = strLine & " | " |
| 0707 | 'Table Rows |
| 0708 | Do Until rsTableControl2.EOF |
| 0709 | strLine = strLine & ""
| 0710 | j = 0 |
| 0711 | Do While j < ifields |
| 0712 | Alignment = "Left" |
| 0713 | Field_Temp = IIf(Len(rsTableControl2.Fields(j) & "") = 0, ".", rsTableControl2(j)) |
| 0714 | Field_Width_Temp = Field_Width * Columns(j) |
| 0715 | If j = ifields - 1 Then |
| 0716 | strQuery = "SELECT Notes.ID FROM Notes WHERE (((Notes.ID)>=" & rsTableControl2.Fields(0) & ")) ORDER BY ID;" |
| 0717 | Set rsTableToRead = CurrentDb.OpenRecordset(strQuery) |
| 0718 | rsTableToRead.MoveFirst |
| 0719 | i = Mid(rsTableControl2.Fields(0) + 100000, 3, 2) |
| 0720 | Hyperlink = i & "/Notes_" & rsTableToRead.Fields(0) & ".htm" |
| 0721 | strLine = strLine & "| " & "" & rsTableControl2.Fields(j) & " | " |
| 0722 | Else |
| 0723 | strLine = strLine & "| " & rsTableControl2.Fields(j) & " | " |
| 0724 | End If |
| 0725 | If j = 4 Then |
| 0726 | Column_Total = Column_Total + rsTableControl2.Fields(j) |
| 0727 | End If |
| 0728 | j = j + 1 |
| 0729 | Loop |
| 0730 | strLine = strLine & " | " |
| 0731 | rsTableControl2.MoveNext |
| 0732 | Loop |
| 0733 | 'Total |
| 0734 | strLine = strLine & "| | | | | " & Round(Column_Total / 60, 2) & " hours | | " |
| 0735 | 'Footer |
| 0736 | strLine = strLine & " | " |
| 0737 | strLine = strLine & " In the above table, the time the routine takes to create the range of pages in question is given (for my own purposes). ""Days Ago"" shows how many days prior to the production of this page (which was on " & Left(Now(), 10) & " at " & Right(Now(), 8) & ") the indicated page was produced. " |
| 0738 | strLine = strLine & "
" |
| 0739 | 'Table 9: Notes Archive |
| 0740 | strLine = strLine & "Lists of Notes Archive pages " |
| 0741 | strLine = strLine & "This table lists the Archived Notes in my database, banded by ranges of internal ID. These pages change individually when anything relevant changes, but in order to ensure the linkages between the various Notes Archive pages and the rest of the database remain current, I regenerate the lot from time to time:-" |
| 0742 | strLine = strLine & "
" |
| 0743 | strQuery = "SELECT Note_Archive_Regen_Ranges.ID_Start AS [Start ID], Note_Archive_Regen_Ranges.ID_End AS [End ID], Note_Archive_Regen_Ranges.Latest_Note_Range_Update AS [Last Update], Int(Now()-[Latest_Note_Range_Update]) AS [Days Ago], Note_Archive_Regen_Ranges.Time_To_Regenerate AS [Minutes To Regenerate], ""Sample"" AS Sample FROM Note_Archive_Regen_Ranges ORDER BY Note_Archive_Regen_Ranges.ID_Start;" |
| 0744 | Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery) |
| 0745 | rsTableControl2.MoveFirst |
| 0746 | ifields = rsTableControl2.Fields.Count |
| 0747 | For i = 0 To ifields - 1 |
| 0748 | Columns(i) = Len(rsTableControl2.Fields(i).Name) |
| 0749 | Next i |
| 0750 | Do Until rsTableControl2.EOF |
| 0751 | For i = 0 To ifields - 1 |
| 0752 | TestLen = Len(rsTableControl2.Fields(i) & "") |
| 0753 | If TestLen > Columns(i) Then |
| 0754 | Columns(i) = TestLen |
| 0755 | End If |
| 0756 | Next i |
| 0757 | rsTableControl2.MoveNext |
| 0758 | Loop |
| 0759 | TotalLen = 0 |
| 0760 | Column_Total = 0 |
| 0761 | For i = 0 To 20 |
| 0762 | TotalLen = TotalLen + Columns(i) |
| 0763 | Next i |
| 0764 | Field_Width = 100 / TotalLen |
| 0765 | rsTableControl2.MoveFirst |
| 0766 | strLine = strLine & ""
| 0767 | 'Table Headers |
| 0768 | strLine = strLine & ""
| 0769 | j = 0 |
| 0770 | Do While j < ifields |
| 0771 | Alignment = "Left" |
| 0772 | Field_Temp = rsTableControl2.Fields(j) |
| 0773 | Field_Width_Temp = Field_Width * Columns(j) |
| 0774 | strLine = strLine & "| " & rsTableControl2.Fields(j).Name & " | " |
| 0775 | j = j + 1 |
| 0776 | Loop |
| 0777 | strLine = strLine & " | " |
| 0778 | 'Table Rows |
| 0779 | Do Until rsTableControl2.EOF |
| 0780 | strLine = strLine & ""
| 0781 | j = 0 |
| 0782 | Do While j < ifields |
| 0783 | Alignment = "Left" |
| 0784 | Field_Temp = IIf(Len(rsTableControl2.Fields(j) & "") = 0, ".", rsTableControl2(j)) |
| 0785 | Field_Width_Temp = Field_Width * Columns(j) |
| 0786 | If j = ifields - 1 Then |
| 0787 | strQuery = "SELECT Notes_Archive.ID, Notes_Archive.Timestamp FROM Notes_Archive WHERE (((Notes_Archive.ID) >=" & rsTableControl2.Fields(0) & ")) ORDER BY Notes_Archive.ID, Notes_Archive.Timestamp DESC;" |
| 0788 | Set rsTableToRead = CurrentDb.OpenRecordset(strQuery) |
| 0789 | rsTableToRead.MoveFirst |
| 0790 | i = Mid(rsTableControl2.Fields(0) + 100000, 3, 2) |
| 0791 | Hyperlink = i & "/Notes_" & rsTableToRead.Fields(0) & "_" & rsTableToRead.Fields(1) & ".htm" |
| 0792 | strLine = strLine & "| " & "" & rsTableControl2.Fields(j) & " | " |
| 0793 | Else |
| 0794 | strLine = strLine & "| " & rsTableControl2.Fields(j) & " | " |
| 0795 | End If |
| 0796 | If j = 4 Then |
| 0797 | Column_Total = Column_Total + Nz(rsTableControl2.Fields(j)) |
| 0798 | End If |
| 0799 | j = j + 1 |
| 0800 | Loop |
| 0801 | strLine = strLine & " | " |
| 0802 | rsTableControl2.MoveNext |
| 0803 | Loop |
| 0804 | 'Total |
| 0805 | strLine = strLine & "| | | | | " & Round(Column_Total / 60, 2) & " hours | | " |
| 0806 | 'Footer |
| 0807 | strLine = strLine & " | " |
| 0808 | strLine = strLine & " In the above table, the time the routine takes to create the range of pages in question is given (for my own purposes). ""Days Ago"" shows how many days prior to the production of this page (which was on " & Left(Now(), 10) & " at " & Right(Now(), 8) & ") the indicated page was produced. " |
| 0809 | Form_Concatenated_Notes_List |
| 0810 | strLine = strLine & " " |
| 0811 | strList = Replace(strList, "../", "123abc") |
| 0812 | strList = Replace(strList, "123abc", "../../") |
| 0813 | strLine = strLine & strList |
| 0814 | 'Read Note 1010 for update |
| 0815 | strQuery = "SELECT Notes.* FROM Notes WHERE Notes.ID = 1010;" |
| 0816 | Set rsTableControl = CurrentDb.OpenRecordset(strQuery) |
| 0817 | rsTableControl.MoveFirst |
| 0818 | rsTableControl.Edit |
| 0819 | 'Update Note 1010 |
| 0820 | rsTableControl.Fields(3) = strLine 'Note Title |
| 0821 | 'Set Note Status |
| 0822 | rsTableControl.Fields(10) = "Temp" |
| 0823 | rsTableControl.Update |
| 0824 | 'Output the note |
| 0825 | DoCmd.RunSQL ("DELETE Notes_To_Regen.* FROM Notes_To_Regen;") |
| 0826 | Set rsTableControl = CurrentDb.OpenRecordset("SELECT Notes_To_Regen.* FROM Notes_To_Regen;") |
| 0827 | rsTableControl.AddNew |
| 0828 | rsTableControl.Fields(0) = 1010 |
| 0829 | rsTableControl.Fields(1) = Int(Now() * 1000) |
| 0830 | rsTableControl.Update |
| 0831 | DoCmd.OpenQuery ("Temp_Note_Timestamp_Update") 'Added October 2024 ... to give better indication of the latest changed date for Temp Notes (to protect against 'Full Regen' date for temp notes) |
| 0832 | Archive_Notes_Now = "No" |
| 0833 | Regenerate_the_Links = "No" |
| 0834 | Regen_Notes_Only = "Yes" |
| 0835 | automatic_processing = "Yes" |
| 0836 | CreateNotesWebPages |
| 0837 | Set rsTableControl = Nothing |
| 0838 | Set rsTableControl2 = Nothing |
| 0839 | Set rsTableToRead = Nothing |
| 0840 | End Sub |