| Line-No. / Ref. | Code Line |
| 0001 | Public Function Author_Reference_String(strAuthors, iDepth) |
| 0002 | Dim i As Long |
| 0003 | Dim j As Long |
| 0004 | Dim k As Long |
| 0005 | Dim strAuthorsLocal As String |
| 0006 | Dim strPrefix As String |
| 0007 | Dim strAuthorFound As String |
| 0008 | Dim strAuthorsLocalList As String |
| 0009 | Dim strAuthorsLocalDelimeter As String |
| 0010 | i = 0 |
| 0011 | k = 1 |
| 0012 | strAuthorsLocal = strAuthors |
| 0013 | strPrefix = "" |
| 0014 | Do Until i = iDepth |
| 0015 | strPrefix = strPrefix & "../" |
| 0016 | i = i + 1 |
| 0017 | Loop |
| 0018 | i = 1 |
| 0019 | strAuthorsLocalDelimeter = "" |
| 0020 | Do While i + j > 0 |
| 0021 | i = InStr(k, strAuthorsLocal, ",") |
| 0022 | j = InStr(k, strAuthorsLocal, "&") |
| 0023 | If j > i Then |
| 0024 | If i > 0 Then |
| 0025 | strAuthorFound = Trim(Mid(strAuthorsLocal, k, i - k)) |
| 0026 | strAuthorsLocalDelimeter = ", " |
| 0027 | k = i + 1 |
| 0028 | Else |
| 0029 | strAuthorFound = Trim(Mid(strAuthorsLocal, k, j - k)) |
| 0030 | strAuthorsLocalDelimeter = " & " |
| 0031 | k = j + 1 |
| 0032 | End If |
| 0033 | Else |
| 0034 | If j > 0 Then |
| 0035 | strAuthorFound = Trim(Mid(strAuthorsLocal, k, j - k)) |
| 0036 | strAuthorsLocalDelimeter = " & " |
| 0037 | k = j + 1 |
| 0038 | Else |
| 0039 | If i > 0 Then |
| 0040 | strAuthorFound = Trim(Mid(strAuthorsLocal, k, i - k)) |
| 0041 | strAuthorsLocalDelimeter = ", " |
| 0042 | k = i + 1 |
| 0043 | Else |
| 0044 | strAuthorFound = Trim(Mid(strAuthorsLocal, k, Len(strAuthorsLocal))) |
| 0045 | strAuthorsLocalDelimeter = "" |
| 0046 | End If |
| 0047 | End If |
| 0048 | End If |
| 0049 | If InStr(strAuthorFound, "(") > 0 Then |
| 0050 | strAuthorFound = "" & strAuthorFound & "" |
| 0051 | Else |
| 0052 | Select Case strAuthorFound |
| 0053 | Case "Dud", "Ed.", "Ed", "Eds.", "Eds", "Etc", "Etc.", "Unknown Author" |
| 0054 | Case Else |
| 0055 | strAuthorFound = "" & strAuthorFound & "" |
| 0056 | End Select |
| 0057 | End If |
| 0058 | strAuthorsLocalList = strAuthorsLocalList & strAuthorFound & strAuthorsLocalDelimeter |
| 0059 | Loop |
| 0060 | 'Return final string |
| 0061 | strAuthors = strAuthorsLocalList |
| 0062 | End Function |
| Line-No. / Ref. | Code Line |
| 0001 | Public Sub Check_Types() |
| 0002 | Dim rsCheck As Recordset |
| 0003 | Dim Directory As String |
| 0004 | Dim NameBody As String |
| 0005 | Dim FileName As String |
| 0006 | Dim File_Type As String |
| 0007 | Directory = TheoWebsiteRoot & "\" |
| 0008 | 'Subjects |
| 0009 | Set rsCheck = CurrentDb.OpenRecordset("Select * FROM Subjects;") |
| 0010 | rsCheck.MoveFirst |
| 0011 | Do Until rsCheck.EOF |
| 0012 | NameBody = "BookCatalogCategorised_Top" |
| 0013 | FileName = Directory & NameBody & "_" & rsCheck.Fields(0) & ".htm" |
| 0014 | If Dir(FileName) <> "" Then |
| 0015 | File_Type = "Top" |
| 0016 | Else |
| 0017 | NameBody = "BookCatalogCategorised" |
| 0018 | FileName = Directory & NameBody & "_" & rsCheck.Fields(0) & ".htm" |
| 0019 | If Dir(FileName) <> "" Then |
| 0020 | File_Type = "ID" |
| 0021 | Else |
| 0022 | File_Type = "None" |
| 0023 | End If |
| 0024 | End If |
| 0025 | rsCheck.Edit |
| 0026 | rsCheck.Fields(3) = File_Type |
| 0027 | rsCheck.Update |
| 0028 | rsCheck.MoveNext |
| 0029 | Loop |
| 0030 | Set rsCheck = Nothing |
| 0031 | 'Sub_Topics |
| 0032 | Set rsCheck = CurrentDb.OpenRecordset("Select * FROM [Sub-Topics];") |
| 0033 | rsCheck.MoveFirst |
| 0034 | Do Until rsCheck.EOF |
| 0035 | NameBody = "PaperCatalogPhilosophyFullCategorisedSubTopic_" |
| 0036 | FileName = Directory & NameBody & rsCheck.Fields(0) & ".htm" |
| 0037 | If Dir(FileName) <> "" Then |
| 0038 | File_Type = "ID" |
| 0039 | Else |
| 0040 | File_Type = "None" |
| 0041 | End If |
| 0042 | rsCheck.Edit |
| 0043 | rsCheck.Fields(4) = File_Type |
| 0044 | rsCheck.Update |
| 0045 | rsCheck.MoveNext |
| 0046 | Loop |
| 0047 | Set rsCheck = Nothing |
| 0048 | 'Topics |
| 0049 | Set rsCheck = CurrentDb.OpenRecordset("Select * FROM [Topics];") |
| 0050 | rsCheck.MoveFirst |
| 0051 | Do Until rsCheck.EOF |
| 0052 | NameBody = "PaperCatalogPhilosophyFullCategorised_Top_" |
| 0053 | FileName = Directory & NameBody & rsCheck.Fields(0) & ".htm" |
| 0054 | If Dir(FileName) <> "" Then |
| 0055 | File_Type = "ID" |
| 0056 | Else |
| 0057 | File_Type = "None" |
| 0058 | End If |
| 0059 | rsCheck.Edit |
| 0060 | rsCheck.Fields(3) = File_Type |
| 0061 | rsCheck.Update |
| 0062 | rsCheck.MoveNext |
| 0063 | Loop |
| 0064 | Set rsCheck = Nothing |
| 0065 | End Sub |
| Line-No. / Ref. | Code Line |
| 0001 | Private Sub cmdBookCitings_Click() |
| 0002 | Dim strMessage As String |
| 0003 | Dim StartTime As Double |
| 0004 | Dim rsTableToRead As Recordset |
| 0005 | Dim rsTableToRead2 As Recordset |
| 0006 | Dim Duration As Double |
| 0007 | Dim strRunTime As String |
| 0008 | Dim RunDate As Date |
| 0009 | Set rsTableToRead = CurrentDb.OpenRecordset("SELECT * FROM BookPaperControl WHERE ID = ""WebpageGenBookCitations"";") |
| 0010 | RunDate = rsTableToRead.Fields(1) |
| 0011 | strRunTime = Round(rsTableToRead.Fields(2), 1) |
| 0012 | strMessage = "Do you want to regenerate the ""Books Citations Links"" page (after first regenerating the individual Book Citations pages)?""" |
| 0013 | strMessage = strMessage & Chr$(10) & "The last run on " & RunDate & " took " & strRunTime & " minutes." |
| 0014 | RootCreated = "" |
| 0015 | If MsgBox(strMessage, vbYesNo) = vbYes Then |
| 0016 | StartTime = Now() |
| 0017 | WebpageGenBookCitings ("Yes") |
| 0018 | WebpageGenBookCitingsPage |
| 0019 | Duration = Round((Now() - StartTime) * 24 * 60, 1) |
| 0020 | rsTableToRead.Edit |
| 0021 | rsTableToRead.Fields(1) = Now() |
| 0022 | rsTableToRead.Fields(2) = Duration |
| 0023 | rsTableToRead.Update |
| 0024 | Else |
| 0025 | Exit Sub |
| 0026 | End If |
| 0027 | MsgBox "Book Citings Pages Creation Complete in " & Duration & " minutes.", vbOKOnly, "Create Book Citings Pages" |
| 0028 | Set rsTableToRead = Nothing |
| 0029 | Set rsTableToRead2 = Nothing |
| 0030 | End Sub |
| Line-No. / Ref. | Code Line |
| 0001 | Public Sub Forms_Documenter() |
| 0002 | 'Currently only covers the MainForm |
| 0003 | Dim ctl As Control |
| 0004 | Dim rst As Recordset |
| 0005 | Dim strQuery As String |
| 0006 | Dim strLine As String |
| 0007 | Dim strLine_Temp As String |
| 0008 | Dim strTable As String |
| 0009 | Dim strColor As String |
| 0010 | Dim strTableElement As String |
| 0011 | Dim strCodeNote |
| 0012 | Dim rsTableControl As Recordset |
| 0013 | Dim rsTableControl2 As Recordset |
| 0014 | Dim rsTableControl3 As Recordset |
| 0015 | Dim strCols As String |
| 0016 | Dim iCols As Integer |
| 0017 | Dim iCols_Saved As Integer |
| 0018 | Dim ifields As Integer |
| 0019 | Dim i As Integer |
| 0020 | Dim j As Long |
| 0021 | Dim k As Long |
| 0022 | Dim colWidth As Integer |
| 0023 | Dim Note_For_Update As Integer |
| 0024 | 'Regenerate the Form Controls Table for MainForm |
| 0025 | strQuery = "DELETE * FROM Form_Controls_Table WHERE Form_Name = ""MainForm"";" |
| 0026 | DoCmd.RunSQL (strQuery) |
| 0027 | Set rst = CurrentDb.OpenRecordset("SELECT * FROM Form_Controls_Table WHERE Form_Name = ""MainForm"";") |
| 0028 | For Each ctl In Forms![MainForm].Controls |
| 0029 | rst.AddNew |
| 0030 | rst.Fields(0) = "MainForm" |
| 0031 | rst.Fields(1) = ctl.Name |
| 0032 | rst.Fields(2) = ctl.ControlType 'acCommandButton = 104 |
| 0033 | If ctl.ControlType <> 111 Then 'Drop-down boxes don't have Captions |
| 0034 | rst.Fields(3) = ctl.Caption |
| 0035 | End If |
| 0036 | rst.Fields(4) = ctl.Width |
| 0037 | rst.Fields(5) = ctl.Height |
| 0038 | rst.Fields(6) = ctl.Top |
| 0039 | rst.Fields(7) = ctl.Left |
| 0040 | rst.Fields(8) = ctl.ForeColor |
| 0041 | rst.Fields(9) = ctl.OnClick |
| 0042 | rst.Update |
| 0043 | Next ctl |
| 0044 | If SubSystem = "Bridge" Then 'Temporary expedient ... eventually remove the code below that creates the Note |
| 0045 | strLine = "" |
| 0046 | Else |
| 0047 | strLine = "Introduction|99||1|This page is generated by +CForms_DocumenterC+, so don't try updating this Note directly!" |
| 0048 | strLine = strLine & "|1|For a high-level and not terribly up-to-date Functional Overview of my website and its generator, see [this Note]++1286++." |
| 0049 | strLine = strLine & "|1|Herewith the Jump Table of the Documentation Notes I've so far written." |
| 0050 | strLine = strLine & "|1|Herewith the VBA Code Control Page for easy access to the code and tables + queries used to generate the site. " |
| 0051 | strLine = strLine & "|1|Tables showing (approximately++FN|..||.|The date/times are those of the documenter-run that archived the particular version of the code. |.|So, they are ""latest"" dates, the ""earliest"" being that of the previous archive. |.|I've not written routines to display the archived code, as there's been no need for it. |..| ++) when the underlying procedures were updated are given via the links below:-|..||.|Recent |.|Full List |..|" |
| 0052 | strLine = strLine & "|1|The documents detailing recent updates and outstanding developments to my Website are given via the links below:-|..||.|[Quarterly Status Report]++520++ |.|[Progress to Date]++822++ |.|[Outstanding Developments]++981++ |..|" |
| 0053 | strLine = strLine & "|1|A bitmap of the front screen of the MS Access application that generates my website is as below:-|99|
![]()
" |
| 0054 | strLine = strLine & " A schematic representation of the front screen is as below. |..||.|I know it's a bit crowded, but it's for private use. |.|Click on ""Code"" for links through to the VBA code. |.|For functional documentation, click on ""Note"". The functions are bunched into classes, so many links will take you to the same place initially. |.|The usual colour-conventions are not followed. This is all my own work! |.|This Note is awaiting further attention++999++.|..|
" |
| 0055 | End If |
| 0056 | If SubSystem = "Bridge" Then |
| 0057 | strQuery = "TRANSFORM First(Form_Controls_Table.Control_Name) AS FirstOfControl_Name SELECT 1+Round(([Control_Top]-113)/567) AS X FROM Form_Controls_Table WHERE (((Form_Controls_Table.Form_Name) = ""MainForm"")) GROUP BY 1+Round(([Control_Top]-113)/567) ORDER BY 1+Round(([Control_Top]-113)/567), 1+Round(([Control_Left]-566)/2000) PIVOT 1+Round(([Control_Left]-566)/2000);" |
| 0058 | Else |
| 0059 | strQuery = "TRANSFORM First(Form_Controls_Table.Control_Name) AS FirstOfControl_Name SELECT 1+Round(([Control_Top]-113)/567) AS X FROM Form_Controls_Table WHERE (((Form_Controls_Table.Form_Name) = ""MainForm"")) GROUP BY 1+Round(([Control_Top]-113)/567) ORDER BY 1+Round(([Control_Top]-113)/567), 1+Round(([Control_Left]-566)/4534) PIVOT 1+Round(([Control_Left]-566)/4534);" |
| 0060 | End If |
| 0061 | Set rsTableControl2 = CurrentDb.OpenRecordset(strQuery) |
| 0062 | strTable = ""
| 0063 | rsTableControl2.MoveFirst |
| 0064 | ifields = rsTableControl2.Fields.Count - 1 |
| 0065 | colWidth = 100 / ifields |
| 0066 | Do Until rsTableControl2.EOF |
| 0067 | strCols = "" |
| 0068 | iCols_Saved = 1 |
| 0069 | strTable = strTable & ""
| 0070 | For i = 1 To ifields |
| 0071 | strTableElement = " " |
| 0072 | strCols = "" |
| 0073 | iCols = 1 |
| 0074 | If rsTableControl2.Fields(i) & "" <> "" Then |
| 0075 | strQuery = "SELECT Form_Controls_Table.Control_Name, Form_Controls_Table.Control_Caption, Form_Controls_Table.Control_Width, Form_Controls_Table.Control_ForeColour, Form_Controls_Table.Control_Type, Form_Controls_Table.Control_OnClickEvent, Form_Documentation_Links.Note FROM Form_Controls_Table LEFT JOIN Form_Documentation_Links ON (Form_Controls_Table.Control_Name = Form_Documentation_Links.Control_Name) AND (Form_Controls_Table.Form_Name = Form_Documentation_Links.Form_Name) WHERE (((Form_Controls_Table.Form_Name)=""MainForm"") AND ((Form_Controls_Table.Control_Name)=""" & rsTableControl2.Fields(i) & """));" |
| 0076 | Set rsTableControl3 = CurrentDb.OpenRecordset(strQuery) |
| 0077 | If Not rsTableControl3.EOF Then |
| 0078 | strTableElement = rsTableControl3.Fields(1) & "" |
| 0079 | Select Case rsTableControl3.Fields(3) |
| 0080 | Case 255 |
| 0081 | strColor = "red" |
| 0082 | Case 16711680 |
| 0083 | strColor = "blue" |
| 0084 | Case 8210719 |
| 0085 | strColor = "#8210719" |
| 0086 | Case Else |
| 0087 | strColor = "black" |
| 0088 | End Select |
| 0089 | strTableElement = "" & strTableElement & "" |
| 0090 | strCodeNote = "" |
| 0091 | If rsTableControl3.Fields(5) = "[Event Procedure]" Then |
| 0092 | strCodeNote = "+C" & rsTableControl2.Fields(i) & "_ClickC+" |
| 0093 | End If |
| 0094 | If rsTableControl3.Fields(6) & "" > "" Then |
| 0095 | If strCodeNote <> "" Then |
| 0096 | strCodeNote = strCodeNote & " + " |
| 0097 | End If |
| 0098 | strCodeNote = strCodeNote & "Note++" & rsTableControl3.Fields(6) & "++" |
| 0099 | End If |
| 0100 | If strCodeNote <> "" Then |
| 0101 | strTableElement = strTableElement & " " & strCodeNote |
| 0102 | End If |
| 0103 | iCols = Round(rsTableControl3.Fields(2) / 4534) |
| 0104 | If iCols > 1 Then |
| 0105 | strCols = " colspan=" & iCols |
| 0106 | Else |
| 0107 | strCols = "" |
| 0108 | End If |
| 0109 | End If |
| 0110 | End If |
| 0111 | If iCols_Saved < 2 Then |
| 0112 | strTable = strTable & "| " & strTableElement & " | " |
| 0113 | iCols_Saved = iCols |
| 0114 | Else |
| 0115 | iCols_Saved = iCols_Saved - 1 |
| 0116 | End If |
| 0117 | Next i |
| 0118 | strTable = strTable & " | " |
| 0119 | rsTableControl2.MoveNext |
| 0120 | Loop |
| 0121 | strTable = strTable & " | " |
| 0122 | strLine = strLine & strTable |
| 0123 | If SubSystem <> "Bridge" Then |
| 0124 | OK = Reference_Code(strLine, 2, "No") 'Is this needed ... it mucks up the Bridge version, hence its exclusion |
| 0125 | End If |
| 0126 | 'Read & update "Website Generator Documentation" Note |
| 0127 | If SubSystem = "Bridge" Then |
| 0128 | Note_For_Update = 1001 |
| 0129 | Else |
| 0130 | Note_For_Update = 841 |
| 0131 | End If |
| 0132 | strQuery = "SELECT Notes.* FROM Notes WHERE Notes.ID = " & Note_For_Update & ";" |
| 0133 | Set rsTableControl = CurrentDb.OpenRecordset(strQuery) |
| 0134 | rsTableControl.MoveFirst |
| 0135 | rsTableControl.Edit |
| 0136 | If SubSystem = "Bridge" Then 'Temporary expedient ... eventually remove the code above that creates the Note |
| 0137 | strLine_Temp = rsTableControl.Fields(3) |
| 0138 | j = InStr(strLine_Temp, "") |
| 0139 | j = j + Len("") |
| 0140 | k = InStr(strLine_Temp, "") |
| 0141 | If i > 0 And j > 0 Then |
| 0142 | strLine = Left(strLine_Temp, j - 1) & strLine & Mid(strLine_Temp, k) |
| 0143 | End If |
| 0144 | End If |
| 0145 | rsTableControl.Fields(3) = strLine |
| 0146 | rsTableControl.Fields(10) = "Temp" |
| 0147 | rsTableControl.Update |
| 0148 | 'Output the note |
| 0149 | DoCmd.RunSQL ("DELETE Notes_To_Regen.* FROM Notes_To_Regen;") |
| 0150 | Set rsTableControl = CurrentDb.OpenRecordset("SELECT Notes_To_Regen.* FROM Notes_To_Regen;") |
| 0151 | rsTableControl.AddNew |
| 0152 | rsTableControl.Fields(0) = Note_For_Update |
| 0153 | rsTableControl.Fields(1) = Now() |
| 0154 | rsTableControl.Update |
| 0155 | Archive_Notes_Now = "No" |
| 0156 | Regenerate_the_Links = "No" |
| 0157 | Regen_Notes_Only = "Yes" |
| 0158 | automatic_processing = "Yes" |
| 0159 | CreateNotesWebPages |
| 0160 | 'tidy Up |
| 0161 | Set rsTableControl = Nothing |
| 0162 | Set rsTableControl2 = Nothing |
| 0163 | Set rsTableControl3 = Nothing |
| 0164 | End Sub |
| Line-No. / Ref. | Code Line |
| 0001 | Public Sub Notes_List_Export() |
| 0002 | 'Create web-page of all Notes web-pages |
| 0003 | Dim strOutputFolder As String |
| 0004 | Dim strOutputFile As String |
| 0005 | Dim strLine As String |
| 0006 | Dim rsTableControl2 As Recordset |
| 0007 | Dim i As Integer |
| 0008 | Dim j As Integer |
| 0009 | Dim FileName As String |
| 0010 | Dim FileName_Root As String |
| 0011 | Dim ifields As Integer |
| 0012 | Dim Field_Width As Single |
| 0013 | Dim Field_Width_Changed As Single |
| 0014 | Dim x As String |
| 0015 | Dim Y As String |
| 0016 | Dim Y_Saved As String |
| 0017 | Dim xDate As Date |
| 0018 | Dim ID As Integer |
| 0019 | Dim ID_Saved As Integer |
| 0020 | Dim strJump_Table As String |
| 0021 | Dim strFile_Sub As String |
| 0022 | Dim strColor As String |
| 0023 | DoEvents |
| 0024 | Set rsTableControl2 = CurrentDb.OpenRecordset("Notes_Archive_Files_Checker") |
| 0025 | rsTableControl2.MoveLast |
| 0026 | DoEvents |
| 0027 | FileName_Root = "Notes_List_Control" |
| 0028 | 'Create the jump table ... |
| 0029 | ifields = rsTableControl2.Fields(0) |
| 0030 | ifields = ifields / 100 |
| 0031 | If ifields * 100 < rsTableControl2.Fields(0) Then |
| 0032 | ifields = ifields + 1 |
| 0033 | End If |
| 0034 | Field_Width = 100 / ifields |
| 0035 | rsTableControl2.MoveFirst |
| 0036 | strJump_Table = ""
| 0037 | strJump_Table = strJump_Table & ""
| 0038 | For i = 0 To ifields - 1 |
| 0039 | If i = 0 Then |
| 0040 | strFile_Sub = "" |
| 0041 | Else |
| 0042 | strFile_Sub = "_" & Right(100 + i, 2) |
| 0043 | End If |
| 0044 | strJump_Table = strJump_Table & "| " & i * 100 & "+ | " |
| 0045 | Next i |
| 0046 | strJump_Table = strJump_Table & " | | " |
| 0047 | ifields = rsTableControl2.Fields.Count |
| 0048 | Field_Width = Round(100 / (ifields + 5)) |
| 0049 | strOutputFolder = TheoWebsiteRoot & "\" |
| 0050 | Set fsoTextFile2 = New FileSystemObject |
| 0051 | FileName_Root = "Notes_List_Control" |
| 0052 | Y_Saved = "" |
| 0053 | ID_Saved = 0 |
| 0054 | Do While Not rsTableControl2.EOF |
| 0055 | ID = rsTableControl2.Fields(0) |
| 0056 | Y = Mid(rsTableControl2.Fields(0) + 10000, 2, 2) |
| 0057 | i = Val(Y) |
| 0058 | If Y <> Y_Saved Then |
| 0059 | If Y_Saved <> "" Then |
| 0060 | 'Terminate & output previous page ... |
| 0061 | 'Page Footer |
| 0062 | strLine = " |
| Line-No. / Ref. | Code Line |
| 0001 | Public Function Reference_Tables(strText, Optional Depth) |
| 0002 | Dim x As Long |
| 0003 | Dim Y As Long |
| 0004 | Dim strCodeRef As String |
| 0005 | Dim CodeRef As String |
| 0006 | Dim strText_Local As String |
| 0007 | Dim strText_End As String |
| 0008 | Dim qryString As String |
| 0009 | Dim rsTableToRead As Recordset |
| 0010 | Dim iDepth As Integer |
| 0011 | Dim strPrefix As String |
| 0012 | Dim i As Integer |
| 0013 | If Len(strText) = 0 Then |
| 0014 | Reference_Tables = "Not Found" |
| 0015 | Exit Function |
| 0016 | End If |
| 0017 | If IsMissing(Depth) Then |
| 0018 | iDepth = 2 |
| 0019 | Else |
| 0020 | iDepth = Depth |
| 0021 | End If |
| 0022 | i = 0 |
| 0023 | strPrefix = "" |
| 0024 | Do While i < iDepth |
| 0025 | strPrefix = strPrefix & "../" |
| 0026 | i = i + 1 |
| 0027 | Loop |
| 0028 | strText_Local = strText |
| 0029 | x = 1 |
| 0030 | x = InStr(x, strText_Local, "+T") |
| 0031 | Reference_Tables = "Not Found" |
| 0032 | Do While x > 0 |
| 0033 | Reference_Tables = "Found" |
| 0034 | Y = InStr(x + 1, strText_Local, "T+") |
| 0035 | 'Watch out for false positives in finding +T |
| 0036 | If Y = 0 Then |
| 0037 | x = x + 1 |
| 0038 | Else |
| 0039 | If Y - x > 100 Then |
| 0040 | x = x + 1 |
| 0041 | Else |
| 0042 | strCodeRef = Mid(strText_Local, x + 2, Y - x - 2) |
| 0043 | CodeRef = Trim(strCodeRef) |
| 0044 | If Y > Len(strText_Local) - 2 Then |
| 0045 | strText_End = "" |
| 0046 | Else |
| 0047 | strText_End = Mid(strText_Local, Y + 2, Len(strText_Local)) |
| 0048 | End If |
| 0049 | 'Check this is indeed a Table, and provide the reference |
| 0050 | qryString = "SELECT Table_Name FROM Table_Definitions WHERE (((Table_Name)=""" & CodeRef & """));" |
| 0051 | Set rsTableToRead = CurrentDb.OpenRecordset(qryString) |
| 0052 | If Not rsTableToRead.EOF Then |
| 0053 | rsTableToRead.MoveFirst |
| 0054 | strText_Local = Left(strText_Local, x - 1) & "" & CodeRef & "" & strText_End |
| 0055 | Else |
| 0056 | strText_Local = Left(strText_Local, x - 1) & CodeRef & strText_End |
| 0057 | x = x + 2 |
| 0058 | End If |
| 0059 | Set rsTableToRead = Nothing |
| 0060 | End If |
| 0061 | End If |
| 0062 | x = InStr(x, strText_Local, "+T") |
| 0063 | Loop |
| 0064 | strText = strText_Local |
| 0065 | End Function |