| Line-No. / Ref. | Code Line |
| 0001 | Public Sub Change_Linkages() |
| 0002 | Dim rst As Recordset |
| 0003 | Dim db As Database |
| 0004 | Dim strText As String |
| 0005 | Dim OK As String |
| 0006 | Set db = CurrentDb |
| 0007 | Set rst = db.OpenRecordset("Select Papers.[Comments], Papers.Abstract from Papers where ((Papers.[Comments] & """" <> """") OR (Papers.Abstract & """" <> """"));") |
| 0008 | If Not rst.EOF Then |
| 0009 | rst.MoveFirst |
| 0010 | Do While Not rst.EOF |
| 0011 | strText = rst.Fields(0).Value & "" |
| 0012 | 'Replace |
| 0013 | If strText <> "" Then |
| 0014 | OK = ReplaceCode(strText, "*P", "+P") |
| 0015 | strText = ReplaceCode(OK, "*B", "+B") |
| 0016 | OK = ReplaceCode(strText, "*N", "+N") |
| 0017 | strText = ReplaceCode(OK, "P*", "P+") |
| 0018 | OK = ReplaceCode(strText, "B*", "B+") |
| 0019 | strText = ReplaceCode(OK, "N*", "N+") |
| 0020 | OK = ReplaceCode(strText, "**", "++") |
| 0021 | 'Update |
| 0022 | rst.Edit |
| 0023 | rst.Fields(0).Value = OK |
| 0024 | rst.Update |
| 0025 | End If |
| 0026 | strText = rst.Fields(1).Value & "" |
| 0027 | 'Replace |
| 0028 | If strText <> "" Then |
| 0029 | OK = ReplaceCode(strText, "*P", "+P") |
| 0030 | strText = ReplaceCode(OK, "*B", "+B") |
| 0031 | OK = ReplaceCode(strText, "*N", "+N") |
| 0032 | strText = ReplaceCode(OK, "P*", "P+") |
| 0033 | OK = ReplaceCode(strText, "B*", "B+") |
| 0034 | strText = ReplaceCode(OK, "N*", "N+") |
| 0035 | OK = ReplaceCode(strText, "**", "++") |
| 0036 | 'Update |
| 0037 | rst.Edit |
| 0038 | rst.Fields(1).Value = OK |
| 0039 | rst.Update |
| 0040 | End If |
| 0041 | rst.MoveNext |
| 0042 | Loop |
| 0043 | End If |
| 0044 | End Sub |
| Line-No. / Ref. | Code Line |
| 0001 | Public Sub Change_Linkages_Notes() |
| 0002 | Dim rst As Recordset |
| 0003 | Dim db As Database |
| 0004 | Dim strText As String |
| 0005 | Dim OK As String |
| 0006 | Set db = CurrentDb |
| 0007 | Set rst = db.OpenRecordset("Select Notes.[Item_Text] from Notes;") |
| 0008 | If Not rst.EOF Then |
| 0009 | rst.MoveFirst |
| 0010 | Do While Not rst.EOF |
| 0011 | strText = rst.Fields(0).Value & "" |
| 0012 | 'Replace |
| 0013 | If strText <> "" Then |
| 0014 | OK = ReplaceCode(strText, "*P", "+P") |
| 0015 | strText = ReplaceCode(OK, "*B", "+B") |
| 0016 | OK = ReplaceCode(strText, "*N", "+N") |
| 0017 | strText = ReplaceCode(OK, "P*", "P+") |
| 0018 | OK = ReplaceCode(strText, "B*", "B+") |
| 0019 | strText = ReplaceCode(OK, "N*", "N+") |
| 0020 | OK = ReplaceCode(strText, "**", "++") |
| 0021 | strText = ReplaceCode(OK, "P+*", "p++") |
| 0022 | OK = ReplaceCode(strText, "B+*", "b++") |
| 0023 | strText = ReplaceCode(OK, "N+*", "n++") |
| 0024 | 'Update |
| 0025 | rst.Edit |
| 0026 | rst.Fields(0).Value = OK |
| 0027 | rst.Update |
| 0028 | End If |
| 0029 | rst.MoveNext |
| 0030 | Loop |
| 0031 | End If |
| 0032 | End Sub |
| Line-No. / Ref. | Code Line |
| 0001 | Public Sub Change_Linkages_Notes_Archive() |
| 0002 | Dim rst As Recordset |
| 0003 | Dim db As Database |
| 0004 | Dim strText As String |
| 0005 | Dim OK As String |
| 0006 | Set db = CurrentDb |
| 0007 | Set rst = db.OpenRecordset("Select Notes_Archive.[Item_Text] from Notes_Archive;") |
| 0008 | If Not rst.EOF Then |
| 0009 | rst.MoveFirst |
| 0010 | Do While Not rst.EOF |
| 0011 | strText = rst.Fields(0).Value & "" |
| 0012 | 'Replace |
| 0013 | If strText <> "" Then |
| 0014 | OK = ReplaceCode(strText, "*P", "+P") |
| 0015 | strText = ReplaceCode(OK, "*B", "+B") |
| 0016 | OK = ReplaceCode(strText, "*N", "+N") |
| 0017 | strText = ReplaceCode(OK, "P*", "P+") |
| 0018 | OK = ReplaceCode(strText, "B*", "B+") |
| 0019 | strText = ReplaceCode(OK, "N*", "N+") |
| 0020 | OK = ReplaceCode(strText, "**", "++") |
| 0021 | strText = ReplaceCode(OK, "P+*", "p++") |
| 0022 | OK = ReplaceCode(strText, "B+*", "b++") |
| 0023 | strText = ReplaceCode(OK, "N+*", "n++") |
| 0024 | 'Update |
| 0025 | rst.Edit |
| 0026 | rst.Fields(0).Value = OK |
| 0027 | rst.Update |
| 0028 | End If |
| 0029 | rst.MoveNext |
| 0030 | Loop |
| 0031 | End If |
| 0032 | End Sub |
| Line-No. / Ref. | Code Line |
| 0001 | Public Sub PrintNote() |
| 0002 | Dim iFootNoteID As Variant |
| 0003 | Dim maxDepth As Integer |
| 0004 | Dim SuppressPrivate As Variant |
| 0005 | Dim strQuery As String |
| 0006 | Dim rsTableControl As Recordset |
| 0007 | Dim Duration, StartTime, Secure, Timestamp, Processed |
| 0008 | 'Check for Temp Notes |
| 0009 | Set rsTableControl = CurrentDb.OpenRecordset("SELECT Notes.ID FROM Notes WHERE (((Notes.Status)=""Temp""));") |
| 0010 | If Not rsTableControl.EOF Then |
| 0011 | If MsgBox("There are ""Temp"" Notes in the database and if referenced they will be printed (though not copied to the Transfer directory). Proceed?", vbYesNo) = vbNo Then |
| 0012 | Exit Sub |
| 0013 | End If |
| 0014 | End If |
| 0015 | Set rsTableControl = Nothing |
| 0016 | If MsgBox("Do you want to print all Notes specified in the Notes_to_Print table?", vbYesNo, "Automatic?") = vbYes Then |
| 0017 | StartTime = Now() |
| 0018 | Regen_Note_Links |
| 0019 | strQuery = "SELECT Notes_to_Print.Note_ID, Notes_to_Print.Max_Depth, Notes_to_Print.Private, Notes_to_Print.Print_ReadingList, Notes_to_Print.Print_DupNoteRefs, Notes.Note_Group, Notes.Last_Changed, Note_Print_Links.[Processed?] FROM (Notes_to_Print INNER JOIN Notes ON Notes_to_Print.Note_ID = Notes.ID) LEFT JOIN Note_Print_Links ON (Notes.ID = Note_Print_Links.Note_ID) AND (Notes.Last_Changed = Note_Print_Links.Timestamp) WHERE Notes_to_Print.Current = -1 ORDER BY Notes_to_Print.Note_ID, Notes_to_Print.Max_Depth;" |
| 0020 | Set rsTableControl = CurrentDb.OpenRecordset(strQuery) |
| 0021 | If Not rsTableControl.EOF Then |
| 0022 | rsTableControl.MoveFirst |
| 0023 | Do While Not rsTableControl.EOF |
| 0024 | iFootNoteID = rsTableControl.Fields(0).Value |
| 0025 | maxDepth = rsTableControl.Fields(1).Value |
| 0026 | SuppressPrivate = rsTableControl.Fields(2).Value |
| 0027 | strPrintReadingLists = rsTableControl.Fields(3).Value |
| 0028 | strPrintDuplicateFootnoteRefs = rsTableControl.Fields(4).Value |
| 0029 | Secure = rsTableControl.Fields(5).Value 'Notes Group 10 is "Secure" |
| 0030 | Timestamp = rsTableControl.Fields(6) & "" |
| 0031 | Processed = rsTableControl.Fields(7) & "" |
| 0032 | OK = NoteForPrinting(iFootNoteID, maxDepth, SuppressPrivate, Secure, Timestamp, Processed) |
| 0033 | rsTableControl.MoveNext |
| 0034 | Loop |
| 0035 | End If |
| 0036 | 'Flag any archive-prints as done |
| 0037 | DoCmd.RunSQL ("UPDATE Note_Print_Links SET Note_Print_Links.[Processed?] = ""Yes"";") |
| 0038 | Else |
| 0039 | iFootNoteID = InputBox("Which Footnote ID? Press ""Cancel"" to escape!", "Footnote ID", 1) |
| 0040 | If Len(iFootNoteID) = 0 Then |
| 0041 | Exit Sub |
| 0042 | End If |
| 0043 | strQuery = "SELECT Notes.Note_Group FROM Notes WHERE (((Notes.ID)=" & iFootNoteID & "));" |
| 0044 | Set rsTableControl = CurrentDb.OpenRecordset(strQuery) |
| 0045 | If Not rsTableControl.EOF Then |
| 0046 | rsTableControl.MoveFirst |
| 0047 | Secure = rsTableControl.Fields(0) |
| 0048 | Else |
| 0049 | MsgBox ("Note does not exist!") |
| 0050 | Exit Sub |
| 0051 | End If |
| 0052 | maxDepth = InputBox("How many levels of Footnotes?", "Footnote Levels", 1) |
| 0053 | If Len(maxDepth) = 0 Then |
| 0054 | Exit Sub |
| 0055 | End If |
| 0056 | If MsgBox("Suppress Private Footnotes?", vbYesNo, "Private Footnotes?") = vbYes Then |
| 0057 | SuppressPrivate = "Yes" |
| 0058 | Else |
| 0059 | SuppressPrivate = "No" |
| 0060 | End If |
| 0061 | If MsgBox("Suppress Reading Lists?", vbYesNo, "Reading Lists?") = vbYes Then |
| 0062 | strPrintReadingLists = "No" |
| 0063 | Else |
| 0064 | strPrintReadingLists = "Yes" |
| 0065 | End If |
| 0066 | If MsgBox("Suppress References to Duplicate Notes?", vbYesNo, "Duplicate Notes?") = vbYes Then |
| 0067 | strPrintDuplicateFootnoteRefs = "No" |
| 0068 | Else |
| 0069 | strPrintDuplicateFootnoteRefs = "Yes" |
| 0070 | End If |
| 0071 | StartTime = Now() |
| 0072 | Regen_Note_Links |
| 0073 | strQuery = "SELECT Note_Print_Links.Timestamp, Note_Print_Links.[Processed?] FROM Note_Print_Links WHERE (((Note_Print_Links.[Processed?])=""No"") AND ((Note_Print_Links.Note_ID)=" & iFootNoteID & "));" |
| 0074 | Set rsTableControl = CurrentDb.OpenRecordset(strQuery) |
| 0075 | If Not rsTableControl.EOF Then |
| 0076 | rsTableControl.MoveFirst |
| 0077 | Timestamp = rsTableControl.Fields(0) |
| 0078 | Processed = rsTableControl.Fields(1) |
| 0079 | Else |
| 0080 | Timestamp = "" |
| 0081 | Processed = "" |
| 0082 | End If |
| 0083 | OK = NoteForPrinting(iFootNoteID, maxDepth, SuppressPrivate, Secure, Timestamp, Processed) |
| 0084 | 'Flag any archive-print as done |
| 0085 | If Timestamp <> "" Then |
| 0086 | DoCmd.RunSQL ("UPDATE Note_Print_Links SET Note_Print_Links.[Processed?] = ""Yes"" WHERE (((Note_Print_Links.Timestamp)=" & Timestamp & ") AND ((Note_Print_Links.Note_ID)=" & iFootNoteID & "));") |
| 0087 | End If |
| 0088 | End If |
| 0089 | Duration = Round((Now() - StartTime) * 24 * 60, 1) |
| 0090 | If Duration < 1 Then |
| 0091 | Duration = Round((Now() - StartTime) * 24 * 60 * 60) |
| 0092 | MsgBox "Printable notes output OK in " & Duration & " seconds.", vbOKOnly, "Printable Notes" |
| 0093 | Else |
| 0094 | MsgBox "Printable notes output OK in " & Duration & " minutes.", vbOKOnly, "Printable Notes" |
| 0095 | End If |
| 0096 | End Sub |
| Line-No. / Ref. | Code Line |
| 0001 | Public Sub WebpageGenAuthors() |
| 0002 | Dim rsTableToRead As Recordset |
| 0003 | Dim Response |
| 0004 | Dim Author As String |
| 0005 | Dim Blurb As String |
| 0006 | Dim strMessage As String |
| 0007 | Dim Total_Run As Single |
| 0008 | Dim Run_Type As String |
| 0009 | strControlTable = "Authors" |
| 0010 | strOutputFileShort = "Author" |
| 0011 | strOutputFolder = TheoWebsiteRoot & "\Authors\" |
| 0012 | strOutputFile = "" |
| 0013 | Total_Run = 0 |
| 0014 | If automatic_processing <> "Yes" Then |
| 0015 | Response = MsgBox("Do you want to regenerate pages for (potentially) changed Author-Lists only?", vbYesNoCancel) |
| 0016 | Else |
| 0017 | Response = vbYes |
| 0018 | End If |
| 0019 | If Response = vbYes Then |
| 0020 | strDataQuery = "Authors_List_Changed" |
| 0021 | Run_Type = "Changed" |
| 0022 | Else |
| 0023 | Run_Type = "Regen" |
| 0024 | If Response = vbNo Then |
| 0025 | Response = MsgBox("Do you want to regenerate pages for Authors starting with a particular letter?", vbYesNoCancel) |
| 0026 | If Response = vbYes Then |
| 0027 | Set rsTableToRead = CurrentDb.OpenRecordset("SELECT * FROM Author_Letters WHERE [Select?] = True ORDER BY Author_Letter;") |
| 0028 | If Not rsTableToRead.EOF Then |
| 0029 | rsTableToRead.MoveFirst |
| 0030 | strMessage = "Run for the following letter" & IIf(rsTableToRead.RecordCount > 1, "s", "") & "?" & Chr(10) & Chr(10) |
| 0031 | Do While Not rsTableToRead.EOF |
| 0032 | strMessage = strMessage & rsTableToRead.Fields(0) & ": " & Round(rsTableToRead.Fields(3), 0) & " mins (" & Round(rsTableToRead.Fields(2), 0) & ", " & Round((Now() - Round(rsTableToRead.Fields(2))), 0) & " days)" & Chr(10) |
| 0033 | Total_Run = Total_Run + rsTableToRead.Fields(3) |
| 0034 | rsTableToRead.MoveNext |
| 0035 | Loop |
| 0036 | strMessage = strMessage & "Total time = " & Round(Total_Run, 0) & " mins." & Chr(10) & Chr(10) |
| 0037 | Else |
| 0038 | DoCmd.OpenTable ("Author_Letters") |
| 0039 | MsgBox ("No Letters selected. Update the Author_Letters Table.") |
| 0040 | End |
| 0041 | End If |
| 0042 | Total_Run = 0 |
| 0043 | Set rsTableToRead = CurrentDb.OpenRecordset("SELECT * FROM Author_Letters WHERE [Select?] = False ORDER BY Author_Letter;") |
| 0044 | If Not rsTableToRead.EOF Then |
| 0045 | strMessage = strMessage & "Not selected:- " & Chr(10) & Chr(10) |
| 0046 | rsTableToRead.MoveFirst |
| 0047 | Do While Not rsTableToRead.EOF |
| 0048 | strMessage = strMessage & rsTableToRead.Fields(0) & ": " & Round(rsTableToRead.Fields(3), 0) & " mins (" & Round(rsTableToRead.Fields(2), 0) & ", " & Round((Now() - Round(rsTableToRead.Fields(2))), 0) & " days)" & Chr(10) |
| 0049 | Total_Run = Total_Run + rsTableToRead.Fields(3) |
| 0050 | rsTableToRead.MoveNext |
| 0051 | Loop |
| 0052 | strMessage = strMessage & "Total time outstanding = " & Round(Total_Run, 0) & " mins." & Chr(10) & Chr(10) |
| 0053 | End If |
| 0054 | Response = MsgBox(strMessage, vbYesNo) |
| 0055 | If Response = vbNo Then |
| 0056 | DoCmd.OpenTable ("Author_Letters") |
| 0057 | MsgBox ("Update the Author_Letters Table.") |
| 0058 | End |
| 0059 | Else |
| 0060 | strDataQuery = "Authors_List_Letter" |
| 0061 | DoCmd.OpenQuery ("Authors_List_Letter_Table_Zap") |
| 0062 | DoCmd.OpenQuery ("Authors_List_Letter_Table_GEN") |
| 0063 | Run_Type = "Regen_Letters" |
| 0064 | End If |
| 0065 | Else |
| 0066 | If Response = vbNo Then |
| 0067 | Response = MsgBox("Do you want to regenerate pages for a particular Authors or Authors?", vbYesNoCancel) |
| 0068 | If Response = vbYes Then |
| 0069 | Set rsTableToRead = CurrentDb.OpenRecordset("SELECT * FROM Author_Parameter;") |
| 0070 | If rsTableToRead.EOF Then |
| 0071 | DoCmd.OpenTable ("Author_Parameter") |
| 0072 | MsgBox ("Update the Author_Parameter Table.") |
| 0073 | End |
| 0074 | Else |
| 0075 | rsTableToRead.MoveFirst |
| 0076 | DoEvents |
| 0077 | Author = rsTableToRead.Fields(0).Value |
| 0078 | rsTableToRead.MoveLast |
| 0079 | If rsTableToRead.RecordCount = 1 Then |
| 0080 | Blurb = Author |
| 0081 | Else |
| 0082 | Blurb = rsTableToRead.RecordCount & " authors from " & Author & " to " & rsTableToRead.Fields(0) |
| 0083 | End If |
| 0084 | DoEvents |
| 0085 | Response = MsgBox("Do you want to run for " & Blurb & "? If not, update the Author_Parameter Table.", vbYesNoCancel) |
| 0086 | If Response = vbYes Then |
| 0087 | strDataQuery = "Authors_List_Selected_Authors" |
| 0088 | Else |
| 0089 | DoCmd.OpenTable ("Author_Parameter") |
| 0090 | End |
| 0091 | End If |
| 0092 | End If |
| 0093 | End If |
| 0094 | End If |
| 0095 | End If |
| 0096 | End If |
| 0097 | End If |
| 0098 | If Response <> vbCancel Then |
| 0099 | CreateAuthorsWebPages (Run_Type) |
| 0100 | If automatic_processing <> "Yes" Then |
| 0101 | Response = MsgBox("Do you want to regenerate the Authors Summary Pages?", vbYesNo) |
| 0102 | Else |
| 0103 | Response = vbYes |
| 0104 | End If |
| 0105 | If Response = vbYes Then |
| 0106 | WebpageGenAuthorsSummary |
| 0107 | If automatic_processing <> "Yes" Then |
| 0108 | MsgBox ("Authors Summary Pages produced OK") |
| 0109 | End If |
| 0110 | End If |
| 0111 | End If |
| 0112 | End Sub |
| Line-No. / Ref. | Code Line |
| 0001 | Public Sub WebpageGenBooksRecentCategorised() |
| 0002 | Dim StartTime As Double |
| 0003 | Dim rsTableToRead As Recordset |
| 0004 | Dim Duration As Double |
| 0005 | Dim strRunTime As String |
| 0006 | Dim RunDate As Date |
| 0007 | Set rsTableToRead = CurrentDb.OpenRecordset("SELECT * FROM BookPaperControl WHERE ID = ""WebpageGenBooksRecentCategorised"";") |
| 0008 | RunDate = rsTableToRead.Fields(1) |
| 0009 | strRunTime = Round(rsTableToRead.Fields(2), 1) |
| 0010 | StartTime = Now() |
| 0011 | strControlTable = "Books_Table_Recent_Categorised" |
| 0012 | strOutputFileShort = "BookCatalogRecentCategorised" |
| 0013 | strOutputFolder = TheoWebsiteRoot & "\" |
| 0014 | strOutputFile = strOutputFolder & strOutputFileShort |
| 0015 | strDataQuery = "Books - Recent - Categorised" |
| 0016 | strSplitTable = "No" |
| 0017 | strControlBreakType = "SubTopic" |
| 0018 | strControlBreakType2 = "" |
| 0019 | Main_Header = "No" |
| 0020 | CreatePapersWebTable |
| 0021 | Duration = Round((Now() - StartTime) * 24 * 60, 1) |
| 0022 | rsTableToRead.Edit |
| 0023 | rsTableToRead.Fields(1) = Now() |
| 0024 | rsTableToRead.Fields(2) = Duration |
| 0025 | rsTableToRead.Update |
| 0026 | Set rsTableToRead = Nothing |
| 0027 | End Sub |
| Line-No. / Ref. | Code Line |
| 0001 | Public Sub WebpageGenConcatenatedNoteGroupWebPages() |
| 0002 | Dim x As String |
| 0003 | Dim Y As Integer |
| 0004 | Dim MaxID As Integer |
| 0005 | Dim rsTableControl As Recordset |
| 0006 | Dim rsNoteGroup As Recordset |
| 0007 | Dim strMessage As String |
| 0008 | Set rsTableControl = CurrentDb.OpenRecordset("SELECT Max(ID) FROM Note_Groups;") |
| 0009 | rsTableControl.MoveFirst |
| 0010 | MaxID = rsTableControl.Fields(0) |
| 0011 | Set rsTableControl = CurrentDb.OpenRecordset("SELECT Note_Groups.Note_Group, Note_Groups.ID, Note_Groups.Time_To_Concatenate, IIf([Latest_Note_Update]>[Latest_Concatenation],Round([Latest_Note_Update]-[Latest_Concatenation],0),0) AS Expr1, Note_Groups.Latest_Concatenation FROM Note_Groups ORDER BY Note_Groups.Note_Group;") |
| 0012 | strMessage = "Enter Note Group ID: (Mins; Last Output)" & Chr(10) & Chr(10) |
| 0013 | rsTableControl.MoveFirst |
| 0014 | Do While Not rsTableControl.EOF |
| 0015 | strMessage = strMessage & rsTableControl.Fields(1) & ": " & rsTableControl.Fields(0) |
| 0016 | strMessage = strMessage & IIf(rsTableControl.Fields(2) & "" <> "", " (" & Round(rsTableControl.Fields(2), 0) & "; " & IIf(Left(rsTableControl.Fields(4), 10) = Left(Now(), 10), Mid(rsTableControl.Fields(4), 11, 100), Left(rsTableControl.Fields(4), 10)) & ")", " ") |
| 0017 | strMessage = strMessage & IIf(rsTableControl.Fields(3) <> 0, Chr$(10) & " ... " & rsTableControl.Fields(3) & " days out of date. ", "") & Chr(10) |
| 0018 | rsTableControl.MoveNext |
| 0019 | Loop |
| 0020 | strControlTable = "ConcatenatedNoteGroup" |
| 0021 | Y = 200 |
| 0022 | Do While Y > 100 |
| 0023 | x = InputBox(strMessage, "Choose a Notes Group") |
| 0024 | If x = "" Then |
| 0025 | Exit Sub |
| 0026 | End If |
| 0027 | If IsNumeric(x) Then |
| 0028 | Y = x |
| 0029 | If Y > 0 And Y < MaxID + 1 Then |
| 0030 | Else |
| 0031 | Y = 200 |
| 0032 | End If |
| 0033 | End If |
| 0034 | Loop |
| 0035 | Set rsTableControl = CurrentDb.OpenRecordset("SELECT Note_Group FROM Note_Groups WHERE ID = " & Y & ";") |
| 0036 | rsTableControl.MoveFirst |
| 0037 | Notes_Group = rsTableControl.Fields(0) |
| 0038 | strOutputFileShort = Replace(Notes_Group, " ", "") |
| 0039 | strOutputFileShort = strOutputFileShort & "ConcatenatedNotes" |
| 0040 | strOutputFolder = TheoWebsiteRoot & "\" |
| 0041 | strOutputFile = "" |
| 0042 | strDataQuery = "Notes_List_Group" |
| 0043 | Notes_Group_ID = Y |
| 0044 | 'Re-create Note_Group_Select |
| 0045 | DoCmd.RunSQL ("Delete * from Note_Group_Select;") |
| 0046 | Set rsNoteGroup = CurrentDb.OpenRecordset("Select * from Note_Group_Select;") |
| 0047 | rsNoteGroup.AddNew |
| 0048 | rsNoteGroup.Fields(0) = Notes_Group_ID |
| 0049 | rsNoteGroup.Update |
| 0050 | Set rsTableControl = Nothing |
| 0051 | CreateConcatenatedNoteGroupWebPages |
| 0052 | Set rsNoteGroup = Nothing |
| 0053 | End Sub |
| Line-No. / Ref. | Code Line |
| 0001 | Public Sub WebpageGenPhilosophyPapersFullCategorised() |
| 0002 | Dim rsQuery As Recordset |
| 0003 | Dim strMsg As String |
| 0004 | Dim strQuery As String |
| 0005 | strControlTable = "Philosophy_Paper_Table_Full_Categorised" |
| 0006 | strOutputFileShort = "PaperCatalogPhilosophyFullCategorised" |
| 0007 | strOutputFolder = TheoWebsiteRoot & "\" |
| 0008 | strOutputFile = strOutputFolder & strOutputFileShort |
| 0009 | strQuery = "Subject_Topic_Unclassifieds" |
| 0010 | strMsg = "WebpageGenPhilosophyPapersFullCategorised: Exiting!! Some tidying up to do first! Set the ""Unclassified"" Topic to the Subject for the papers in query """ & strQuery & """, then run this Sub." |
| 0011 | Set rsQuery = CurrentDb.OpenRecordset("Subject_Topic_Unclassifieds") |
| 0012 | If Not rsQuery.EOF Then |
| 0013 | DoCmd.OpenQuery ("Subject_Topic_Unclassifieds") |
| 0014 | Debug.Print Now() & " - "; strMsg |
| 0015 | If automatic_processing <> "Yes" Then |
| 0016 | MsgBox (strMsg) |
| 0017 | End If |
| 0018 | Exit Sub |
| 0019 | End If |
| 0020 | strDataQuery = "Philosophy Papers - All - Categorised" |
| 0021 | DoCmd.RunSQL ("DELETE [" & strDataQuery & "_Table].* FROM [" & strDataQuery & "_Table];") |
| 0022 | DoCmd.OpenQuery (strDataQuery & "_Table_GEN") |
| 0023 | strDataQuery = "Philosophy Papers - All - Categorised (Titles)" |
| 0024 | DoCmd.RunSQL ("DELETE [" & strDataQuery & "_Table].* FROM [" & strDataQuery & "_Table];") |
| 0025 | DoCmd.OpenQuery (strDataQuery & "_Table_GEN") |
| 0026 | strDataQuery = "Philosophy Papers - All - Categorised (Titles) - Top" |
| 0027 | DoCmd.RunSQL ("DELETE [" & strDataQuery & "_Table].* FROM [" & strDataQuery & "_Table];") |
| 0028 | DoCmd.OpenQuery (strDataQuery & "_Table_GEN") |
| 0029 | strDataQuery = "Philosophy Papers - All - Categorised (Titles) - Solitons" |
| 0030 | DoCmd.RunSQL ("DELETE [" & strDataQuery & "_Table].* FROM [" & strDataQuery & "_Table];") |
| 0031 | DoCmd.OpenQuery (strDataQuery & "_GEN") 'Query-name too long for "_Table" ! |
| 0032 | strDataQuery = "Philosophy Papers - All - Categorised" |
| 0033 | strSplitTable = "Yes" |
| 0034 | strControlBreakType = "SubTopic" |
| 0035 | strControlBreakType2 = "2-Level" |
| 0036 | Main_Header = "Yes" |
| 0037 | CreatePapersWebTable |
| 0038 | End Sub |