THEO TODMAN’S WEBSITE CODE PAGES



This Page provides a jumping-off point for the VBA Code that generates my Website.

Table of Code Documentation Location 38 (1 items)

Monthly_Report_Note1010_Update...

To access information, click on one of the links in the table above.

Go to top of page




Source Code of: Monthly_Report_Note1010_Update
Procedure Type: Public Sub
Module: Monthly Reporting
Lines of Code: 840
Go To End of This Procedure

Line-No. / Ref.Code Line
0001Public Sub Monthly_Report_Note1010_Update()
0002Dim strLine As String
0003Dim rsTableControl As Recordset
0004Dim rsTableControl2 As Recordset
0005Dim rsTableToRead As Recordset
0006Dim strQuery As String
0007Dim strControlQuery As String
0008Dim i As Long
0009Dim j As Integer
0010Dim ifields As Integer
0011Dim Field_Width As Single
0012Dim Field_Width_Temp As Single
0013Dim Alignment As String
0014Dim Field_Temp As String
0015Dim Columns(20)
0016Dim TotalLen As Integer
0017Dim TestLen As Integer
0018Dim Hyperlink As String
0019Dim RunStartTime As Double
0020Dim Column_Total As Single
0021RunStartTime = 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"";"
0025DoCmd.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"";"
0027DoCmd.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"";"
0029DoCmd.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"";"
0031DoCmd.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"";"
0033DoCmd.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"";"
0035DoCmd.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"";"
0037DoCmd.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"";"
0039DoCmd.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"";"
0041DoCmd.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"";"
0043DoCmd.RunSQL (strControlQuery)
0044For i = 0 To 20
0045 Columns(i) = 0
0046Next i
0047strLine = "<p>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. <A HREF = ""#Tables"">The tables below</a> indicate what was generated when. </p><p>But first, a few other useful links:-</p>"
0048strLine = strLine & "|99|"
0049strLine = strLine & "|1|For a list of <b>Frequently Accessed Pages</b> on my website follow <A HREF = ""../../Test/Hits_Pages_Total_Crosstab_Descending.htm"">this Link</A>. "
0050 strLine = strLine & "|1|For a full list of <b>Archived Notes</b> follow <A HREF = ""../../Notes_List_Control.htm"">this Link</A>. The purpose of this page is to allow me easily to see which archived notes are superfluous, so I can delete them."
0051strLine = strLine & "|1|For <b>lists of External Links</b> from my site, follow <A HREF = ""../../Test/WebLinks_Tester_Summary.htm"">this Link</A>. 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 <b>invalid Note Title</b>. The page should be empty. "
0053strLine = strLine & "|1|[Follow this link]++874++ for the Test page showing the results of the latest run to <b>automatically hyperlink objects</b> on the database using Key-Words. "
0054strLine = strLine & "|1|[Follow this link]++981++ for the latest <b>Log of Outstanding Developments</b> for my website. "
0055strLine = strLine & "|99|<br><hr>"
0056strLine = 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|"
0057strLine = strLine & "|1|http://www.theotodman.com/Aeon.htm"
0058strLine = strLine & "|1|http://www.theotodman.com/Bach.htm"
0059strLine = strLine & "|1|http://www.theotodman.com/Blog.htm"
0060strLine = strLine & "|1|http://www.theotodman.com/Bridge.htm"
0061strLine = strLine & "|1|http://www.theotodman.com/Chess.htm"
0062strLine = strLine & "|1|http://www.theotodman.com/CoxesFarm.htm"
0063strLine = strLine & "|1|http://www.theotodman.com/Family.htm"
0064strLine = strLine & "|1|http://www.theotodman.com/Henry.htm"
0065strLine = strLine & "|1|http://www.theotodman.com/HuttonUnion.htm"
0066strLine = strLine & "|1|http://www.theotodman.com/Language.htm"
0067strLine = strLine & "|1|http://www.theotodman.com/MountnessingAndFriends.htm"
0068strLine = strLine & "|1|http://www.theotodman.com/Music.htm"
0069strLine = strLine & "|1|http://www.theotodman.com/Personal.htm"
0070strLine = strLine & "|1|http://www.theotodman.com/Philosophy.htm"
0071strLine = strLine & "|1|http://www.theotodman.com/QuarterlyReport.htm"
0072strLine = strLine & "|1|http://www.theotodman.com/TaskListQTD.htm"
0073strLine = strLine & "|1|http://www.theotodman.com/TaskListYTD.htm"
0074strLine = strLine & "|1|http://www.theotodman.com/Thesis.htm"
0075strLine = strLine & "|1|http://www.theotodman.com/ThesisIntro.htm"
0076strLine = strLine & "|1|http://www.theotodman.com/ThesisStance.htm"
0077strLine = strLine & "|1|http://www.theotodman.com/ToDoList.htm"
0078strLine = strLine & "|1|http://www.theotodman.com/Websites.htm"
0079strLine = strLine & "|99|<br><hr>"
0080Column_Total = 0
0081strLine = strLine & "<a name = ""Tables""></a><h3>Table of Sub-Reports</h3>"
0082strLine = strLine & "This page shows the following tables:-"
0083strLine = strLine & "<br><BR><CENTER>"
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;"
0085Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery)
0086rsTableControl2.MoveFirst
0087ifields = rsTableControl2.Fields.Count
0088For i = 0 To ifields - 1
0089 Columns(i) = Len(rsTableControl2.Fields(i).Name)
0090Next i
0091Do 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
0099Loop
0100TotalLen = 0
0101For i = 0 To 20
0102 If i <> 0 Then 'Ignore the Link column
0103 TotalLen = TotalLen + Columns(i)
0104 End If
0105Next i
0106Field_Width = 100 / TotalLen
0107rsTableControl2.MoveFirst
0108strLine = strLine & "<TABLE class = ""Bridge"" WIDTH=900>"
0109'Table Headers
0110strLine = strLine & "<TR>"
0111j = 0
0112Do 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 & "<TH WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j).Name & "</TH>"
0118 End If
0119 j = j + 1
0120Loop
0121strLine = strLine & "</TR>"
0122'Table Rows
0123Do Until rsTableControl2.EOF
0124 strLine = strLine & "<TR>"
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 & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "<A HREF = ""#" & Hyperlink & """>" & rsTableControl2.Fields(j) & "</A></TD>"
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 & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & Field_Temp & "</TD>"
0144 Else
0145 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j) & "</TD>"
0146 End If
0147 End If
0148 End If
0149 j = j + 1
0150 Loop
0151 strLine = strLine & "</TR>"
0152 rsTableControl2.MoveNext
0153Loop
0154'Total
0155strLine = strLine & "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>" & Round(Column_Total / 60, 2) & " hours</td></tr>"
0156'Footer
0157strLine = strLine & "</TABLE></CENTER><BR><BR>"
0158strLine = 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."
0159strLine = strLine & "<br><br><hr><br>"
0160'Table 1
0161Column_Total = 0
0162strLine = strLine & "<a name = ""BookPapers""></a><h3>Book / Paper (etc) Lists</h3><BR>"
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"":-"
0164strLine = strLine & "<BR><BR><CENTER>"
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];"
0166Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery)
0167rsTableControl2.MoveFirst
0168ifields = rsTableControl2.Fields.Count
0169For i = 0 To ifields - 1
0170 Columns(i) = Len(rsTableControl2.Fields(i).Name)
0171Next i
0172Do 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
0180Loop
0181TotalLen = 0
0182For i = 0 To 20
0183 If i <> 0 Then 'Ignore the Link column
0184 TotalLen = TotalLen + Columns(i)
0185 End If
0186Next i
0187Field_Width = 100 / TotalLen
0188rsTableControl2.MoveFirst
0189strLine = strLine & "<TABLE class = ""Bridge"" WIDTH=900>"
0190'Table Headers
0191strLine = strLine & "<TR>"
0192j = 0
0193Do 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 & "<TH WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j).Name & "</TH>"
0199 End If
0200 j = j + 1
0201Loop
0202strLine = strLine & "</TR>"
0203'Table Rows
0204Do Until rsTableControl2.EOF
0205 strLine = strLine & "<TR>"
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 & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "<A HREF = ""../../" & Hyperlink & """>" & rsTableControl2.Fields(j) & "</A></TD>"
0216 Else
0217 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j) & "</TD>"
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 & "</TR>"
0226 rsTableControl2.MoveNext
0227Loop
0228'Total
0229strLine = strLine & "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>" & Round(Column_Total / 60, 2) & " hours</td></tr>"
0230'Footer
0231strLine = strLine & "</TABLE></CENTER><BR><BR>"
0232strLine = 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."
0233strLine = strLine & "<br><br><hr><br>"
0234'Table 2: Author Lists
0235 strLine = strLine & "<a name = ""Authors""></a><h3>Lists of Works by Particular Authors</h3><BR>"
0236 strLine = strLine & "This table lists the collections of Books and Philosophy Papers in my collection, organised by Author:-"
0237strLine = strLine & "<BR><BR><CENTER>"
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;"
0239Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery)
0240Column_Total = 0
0241rsTableControl2.MoveFirst
0242ifields = rsTableControl2.Fields.Count
0243For i = 0 To ifields - 1
0244 Columns(i) = Len(rsTableControl2.Fields(i).Name)
0245Next i
0246Do 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
0254Loop
0255TotalLen = 0
0256For i = 0 To 20
0257 TotalLen = TotalLen + Columns(i)
0258Next i
0259Field_Width = 100 / TotalLen
0260rsTableControl2.MoveFirst
0261strLine = strLine & "<TABLE class = ""Bridge"" WIDTH=900>"
0262'Table Headers
0263strLine = strLine & "<TR>"
0264j = 0
0265Do While j < ifields
0266 Alignment = "Left"
0267 Field_Temp = rsTableControl2.Fields(j)
0268 Field_Width_Temp = Field_Width * Columns(j)
0269 strLine = strLine & "<TH WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j).Name & "</TH>"
0270 j = j + 1
0271Loop
0272strLine = strLine & "</TR>"
0273'Table Rows
0274Do Until rsTableControl2.EOF
0275 strLine = strLine & "<TR>"
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 & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "<A HREF = ""../../Authors/" & Hyperlink & """>" & rsTableControl2.Fields(j) & "</A></TD>"
0287 Else
0288 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j) & "</TD>"
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 & "</TR>"
0296 rsTableControl2.MoveNext
0297Loop
0298'Total
0299strLine = strLine & "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>" & Round(Column_Total / 60, 2) & " hours</td><td>&nbsp;</td></tr>"
0300'Footer
0301strLine = strLine & "</TABLE></CENTER><BR><BR>"
0302strLine = 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."
0303strLine = strLine & "<br><br><hr><br>"
0304'Table 3: Book Summaries
0305strLine = strLine & "<a name = ""BookSummaries""></a><h3>Lists of Book Summaries </h3><BR>"
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:-"
0307strLine = strLine & "<BR><BR><CENTER>"
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;"
0309Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery)
0310rsTableControl2.MoveFirst
0311ifields = rsTableControl2.Fields.Count
0312For i = 0 To ifields - 1
0313 Columns(i) = Len(rsTableControl2.Fields(i).Name)
0314Next i
0315Do 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
0323Loop
0324TotalLen = 0
0325Column_Total = 0
0326For i = 0 To 20
0327 TotalLen = TotalLen + Columns(i)
0328Next i
0329Field_Width = 100 / TotalLen
0330rsTableControl2.MoveFirst
0331strLine = strLine & "<TABLE class = ""Bridge"" WIDTH=900>"
0332'Table Headers
0333strLine = strLine & "<TR>"
0334j = 0
0335Do While j < ifields
0336 Alignment = "Left"
0337 Field_Temp = rsTableControl2.Fields(j)
0338 Field_Width_Temp = Field_Width * Columns(j)
0339 strLine = strLine & "<TH WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j).Name & "</TH>"
0340 j = j + 1
0341Loop
0342strLine = strLine & "</TR>"
0343'Table Rows
0344Do Until rsTableControl2.EOF
0345 strLine = strLine & "<TR>"
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 & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "<A HREF = ""../../BookSummaries/BookSummary_" & Hyperlink & """>" & rsTableControl2.Fields(j) & "</A></TD>"
0358 Else
0359 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "N/A</TD>"
0360 End If
0361 Else
0362 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j) & "</TD>"
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 & "</TR>"
0370 rsTableControl2.MoveNext
0371Loop
0372'Total
0373strLine = strLine & "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>" & Round(Column_Total / 60, 2) & " hours</td><td>&nbsp;</td></tr>"
0374'Footer
0375strLine = strLine & "</TABLE></CENTER><BR><BR>"
0376strLine = 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."
0377strLine = strLine & "<br><br><hr><br>"
0378'Table 4: Paper Summaries
0379strLine = strLine & "<a name = ""PaperSummaries""></a><h3>Lists of Paper Summaries </h3><BR>"
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:-"
0381strLine = strLine & "<BR><BR><CENTER>"
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;"
0383Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery)
0384rsTableControl2.MoveFirst
0385ifields = rsTableControl2.Fields.Count
0386For i = 0 To ifields - 1
0387 Columns(i) = Len(rsTableControl2.Fields(i).Name)
0388Next i
0389Do 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
0397Loop
0398TotalLen = 0
0399For i = 0 To 20
0400 TotalLen = TotalLen + Columns(i)
0401Next i
0402Field_Width = 100 / TotalLen
0403rsTableControl2.MoveFirst
0404strLine = strLine & "<TABLE class = ""Bridge"" WIDTH=900>"
0405Column_Total = 0
0406'Table Headers
0407strLine = strLine & "<TR>"
0408j = 0
0409Do While j < ifields
0410 Alignment = "Left"
0411 Field_Temp = rsTableControl2.Fields(j)
0412 Field_Width_Temp = Field_Width * Columns(j)
0413 strLine = strLine & "<TH WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j).Name & "</TH>"
0414 j = j + 1
0415Loop
0416strLine = strLine & "</TR>"
0417'Table Rows
0418Do Until rsTableControl2.EOF
0419 strLine = strLine & "<TR>"
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 & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "<A HREF = ""../../PaperSummaries/PaperSummary_" & Hyperlink & """>" & rsTableControl2.Fields(j) & "</A></TD>"
0431 Else
0432 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j) & "</TD>"
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 & "</TR>"
0440 rsTableControl2.MoveNext
0441Loop
0442'Total
0443strLine = strLine & "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>" & Round(Column_Total / 60, 2) & " hours</td><td>&nbsp;</td></tr>"
0444'Footer
0445strLine = strLine & "</TABLE></CENTER><BR><BR>"
0446strLine = 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."
0447strLine = strLine & "<br><br><hr><br>"
0448'Table 5: Book-Paper Link Summaries
0449strLine = strLine & "<a name = ""BookPaperLinkSummaries""></a><h3>Lists of Book-Paper Link Summary pages </h3><BR>"
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:-"
0451strLine = strLine & "<BR><BR><CENTER>"
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;"
0453Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery)
0454rsTableControl2.MoveFirst
0455ifields = rsTableControl2.Fields.Count
0456For i = 0 To ifields - 1
0457 Columns(i) = Len(rsTableControl2.Fields(i).Name)
0458Next i
0459Do 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
0467Loop
0468TotalLen = 0
0469For i = 0 To 20
0470 TotalLen = TotalLen + Columns(i)
0471Next i
0472Field_Width = 100 / TotalLen
0473rsTableControl2.MoveFirst
0474strLine = strLine & "<TABLE class = ""Bridge"" WIDTH=900>"
0475Column_Total = 0
0476'Table Headers
0477strLine = strLine & "<TR>"
0478j = 0
0479Do While j < ifields
0480 Alignment = "Left"
0481 Field_Temp = rsTableControl2.Fields(j)
0482 Field_Width_Temp = Field_Width * Columns(j)
0483 strLine = strLine & "<TH WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j).Name & "</TH>"
0484 j = j + 1
0485Loop
0486strLine = strLine & "</TR>"
0487'Table Rows
0488Do Until rsTableControl2.EOF
0489 strLine = strLine & "<TR>"
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 & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "<A HREF = ""../../BookSummaries/BookSummary_" & Hyperlink & """>" & rsTableControl2.Fields(j) & "</A></TD>"
0501 Else
0502 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j) & "</TD>"
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 & "</TR>"
0510 rsTableControl2.MoveNext
0511Loop
0512'Total
0513strLine = strLine & "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>" & Round(Column_Total / 60, 2) & " hours</td><td>&nbsp;</td></tr>"
0514'Footer
0515strLine = strLine & "</TABLE></CENTER><BR><BR>"
0516strLine = 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."
0517strLine = strLine & "<br><br><hr><br>"
0518'Table 6: Book-Paper Abstracts
0519strLine = strLine & "<a name = ""BookPaperAbstracts""></a><h3>Lists of Book-Paper Abstracts pages </h3><BR>"
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:-"
0521strLine = strLine & "<BR><BR><CENTER>"
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;"
0523Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery)
0524rsTableControl2.MoveFirst
0525ifields = rsTableControl2.Fields.Count
0526For i = 0 To ifields - 1
0527 Columns(i) = Len(rsTableControl2.Fields(i).Name)
0528Next i
0529Do 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
0537Loop
0538TotalLen = 0
0539For i = 0 To 20
0540 TotalLen = TotalLen + Columns(i)
0541Next i
0542Field_Width = 100 / TotalLen
0543rsTableControl2.MoveFirst
0544strLine = strLine & "<TABLE class = ""Bridge"" WIDTH=900>"
0545Column_Total = 0
0546'Table Headers
0547strLine = strLine & "<TR>"
0548j = 0
0549Do While j < ifields
0550 Alignment = "Left"
0551 Field_Temp = rsTableControl2.Fields(j)
0552 Field_Width_Temp = Field_Width * Columns(j)
0553 strLine = strLine & "<TH WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j).Name & "</TH>"
0554 j = j + 1
0555Loop
0556strLine = strLine & "</TR>"
0557'Table Rows
0558Do Until rsTableControl2.EOF
0559 strLine = strLine & "<TR>"
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 & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "N/A</TD>"
0570 Else
0571 rsTableToRead.MoveFirst
0572 Hyperlink = Mid(rsTableControl2.Fields(0) + 100000, 2, 2) & "/BookPaperAbstracts/BookPaperAbstracts_" & rsTableToRead.Fields(0) & ".htm"
0573 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "<A HREF = ""../../BookSummaries/BookSummary_" & Hyperlink & """>" & rsTableControl2.Fields(j) & "</A></TD>"
0574 End If
0575 Else
0576 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j) & "</TD>"
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 & "</TR>"
0584 rsTableControl2.MoveNext
0585Loop
0586'Total
0587strLine = strLine & "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>" & Round(Column_Total / 60, 2) & " hours</td><td>&nbsp;</td></tr>"
0588'Footer
0589strLine = strLine & "</TABLE></CENTER><BR><BR>"
0590strLine = 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."
0591strLine = strLine & "<br><br><hr><br>"
0592'Table 7: Paper Abstracts
0593strLine = strLine & "<a name = ""PaperAbstracts""></a><h3>Lists of Paper Abstracts pages </h3><BR>"
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:-"
0595strLine = strLine & "<BR><BR><CENTER>"
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;"
0597Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery)
0598rsTableControl2.MoveFirst
0599ifields = rsTableControl2.Fields.Count
0600For i = 0 To ifields - 1
0601 Columns(i) = Len(rsTableControl2.Fields(i).Name)
0602Next i
0603Do 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
0611Loop
0612TotalLen = 0
0613Column_Total = 0
0614For i = 0 To 20
0615 TotalLen = TotalLen + Columns(i)
0616Next i
0617Field_Width = 100 / TotalLen
0618rsTableControl2.MoveFirst
0619strLine = strLine & "<TABLE class = ""Bridge"" WIDTH=900>"
0620'Table Headers
0621strLine = strLine & "<TR>"
0622j = 0
0623Do While j < ifields
0624 Alignment = "Left"
0625 Field_Temp = rsTableControl2.Fields(j)
0626 Field_Width_Temp = Field_Width * Columns(j)
0627 strLine = strLine & "<TH WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j).Name & "</TH>"
0628 j = j + 1
0629Loop
0630strLine = strLine & "</TR>"
0631'Table Rows
0632Do Until rsTableControl2.EOF
0633 strLine = strLine & "<TR>"
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 & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "N/A</TD>"
0644 Else
0645 rsTableToRead.MoveFirst
0646 Hyperlink = Mid(rsTableControl2.Fields(0) + 100000, 2, 2) & "/Abstract_" & rsTableToRead.Fields(0) & ".htm"
0647 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "<A HREF = ""../../Abstracts/Abstract_" & Hyperlink & """>" & rsTableControl2.Fields(j) & "</A></TD>"
0648 End If
0649 Else
0650 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j) & "</TD>"
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 & "</TR>"
0658 rsTableControl2.MoveNext
0659Loop
0660'Total
0661strLine = strLine & "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>" & Round(Column_Total / 60, 2) & " hours</td><td>&nbsp;</td></tr>"
0662'Footer
0663strLine = strLine & "</TABLE></CENTER><BR><BR>"
0664strLine = 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."
0665strLine = strLine & "<br><br><hr><br>"
0666'Table 8: Notes
0667'Regenerate the Notes List page
0668Notes_List_Export
0669 strLine = strLine & "<a name = ""Notes""></a><h3>Lists of Notes pages </h3><BR>"
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:-"
0671strLine = strLine & "<BR><BR><CENTER>"
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;"
0673Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery)
0674rsTableControl2.MoveFirst
0675ifields = rsTableControl2.Fields.Count
0676For i = 0 To ifields - 1
0677 Columns(i) = Len(rsTableControl2.Fields(i).Name)
0678Next i
0679Do 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
0687Loop
0688TotalLen = 0
0689For i = 0 To 20
0690 TotalLen = TotalLen + Columns(i)
0691Next i
0692Column_Total = 0
0693Field_Width = 100 / TotalLen
0694rsTableControl2.MoveFirst
0695strLine = strLine & "<TABLE class = ""Bridge"" WIDTH=900>"
0696'Table Headers
0697strLine = strLine & "<TR>"
0698j = 0
0699Do While j < ifields
0700 Alignment = "Left"
0701 Field_Temp = rsTableControl2.Fields(j)
0702 Field_Width_Temp = Field_Width * Columns(j)
0703 strLine = strLine & "<TH WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j).Name & "</TH>"
0704 j = j + 1
0705Loop
0706strLine = strLine & "</TR>"
0707'Table Rows
0708Do Until rsTableControl2.EOF
0709 strLine = strLine & "<TR>"
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 & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "<A HREF = ""../../Notes/Notes_" & Hyperlink & """>" & rsTableControl2.Fields(j) & "</A></TD>"
0722 Else
0723 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j) & "</TD>"
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 & "</TR>"
0731 rsTableControl2.MoveNext
0732Loop
0733'Total
0734strLine = strLine & "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>" & Round(Column_Total / 60, 2) & " hours</td><td>&nbsp;</td></tr>"
0735'Footer
0736strLine = strLine & "</TABLE></CENTER>"
0737strLine = strLine & "<p>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.</p>"
0738strLine = strLine & "<br><br><hr><br>"
0739'Table 9: Notes Archive
0740 strLine = strLine & "<a name = ""NotesArchive""></a><h3>Lists of Notes Archive pages </h3><BR>"
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:-"
0742strLine = strLine & "<BR><BR><CENTER>"
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;"
0744Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery)
0745rsTableControl2.MoveFirst
0746ifields = rsTableControl2.Fields.Count
0747For i = 0 To ifields - 1
0748 Columns(i) = Len(rsTableControl2.Fields(i).Name)
0749Next i
0750Do 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
0758Loop
0759TotalLen = 0
0760Column_Total = 0
0761For i = 0 To 20
0762 TotalLen = TotalLen + Columns(i)
0763Next i
0764Field_Width = 100 / TotalLen
0765rsTableControl2.MoveFirst
0766strLine = strLine & "<TABLE class = ""Bridge"" WIDTH=900>"
0767'Table Headers
0768strLine = strLine & "<TR>"
0769j = 0
0770Do While j < ifields
0771 Alignment = "Left"
0772 Field_Temp = rsTableControl2.Fields(j)
0773 Field_Width_Temp = Field_Width * Columns(j)
0774 strLine = strLine & "<TH WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j).Name & "</TH>"
0775 j = j + 1
0776Loop
0777strLine = strLine & "</TR>"
0778'Table Rows
0779Do Until rsTableControl2.EOF
0780 strLine = strLine & "<TR>"
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 & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & "<A HREF = ""../../Notes/Notes_" & Hyperlink & """>" & rsTableControl2.Fields(j) & "</A></TD>"
0793 Else
0794 strLine = strLine & "<TD WIDTH=""" & Round(Field_Width_Temp, 1) & "%"">" & rsTableControl2.Fields(j) & "</TD>"
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 & "</TR>"
0802 rsTableControl2.MoveNext
0803Loop
0804'Total
0805strLine = strLine & "<tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>" & Round(Column_Total / 60, 2) & " hours</td><td>&nbsp;</td></tr>"
0806'Footer
0807strLine = strLine & "</TABLE></CENTER>"
0808strLine = strLine & "<p>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.</p>"
0809 Form_Concatenated_Notes_List
0810strLine = strLine & "<hr><a name = ""ConcatenatedNotes""></a>"
0811strList = Replace(strList, "../", "123abc")
0812strList = Replace(strList, "123abc", "../../")
0813strLine = strLine & strList
0814'Read Note 1010 for update
0815 strQuery = "SELECT Notes.* FROM Notes WHERE Notes.ID = 1010;"
0816Set rsTableControl = CurrentDb.OpenRecordset(strQuery)
0817rsTableControl.MoveFirst
0818rsTableControl.Edit
0819'Update Note 1010
0820rsTableControl.Fields(3) = strLine 'Note Title
0821'Set Note Status
0822rsTableControl.Fields(10) = "Temp"
0823rsTableControl.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;")
0827rsTableControl.AddNew
0828rsTableControl.Fields(0) = 1010
0829rsTableControl.Fields(1) = Int(Now() * 1000)
0830rsTableControl.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)
0832Archive_Notes_Now = "No"
0833Regenerate_the_Links = "No"
0834Regen_Notes_Only = "Yes"
0835automatic_processing = "Yes"
0836 CreateNotesWebPages
0837Set rsTableControl = Nothing
0838Set rsTableControl2 = Nothing
0839Set rsTableToRead = Nothing
0840End Sub

Procedures Calling This Procedure (Monthly_Report_Note1010_Update) Procedures Called By This Procedure (Monthly_Report_Note1010_Update) Tables / Queries / Fragments Directly Used By This Procedure (Monthly_Report_Note1010_Update) Go To Start of This Procedure
Go To Top of This Page
Link to VBA Code Control Page



© Theo Todman, June 2007 - April 2026. Please address any comments on this page to theo@theotodman.com. File output:
Website Maintenance Dashboard
Return to Top of this Page Return to Theo Todman's Philosophy Page Return to Theo Todman's Home Page