0337 | strElement = ""
0338 | Case 43, 44, 45 |
0339 | strElement = ""
0340 | Case 15, 17, 18, 23, 24, 25, 28, 29, 30, 32 |
0341 | strElement = ""
0342 | Case 42 |
0343 | strElement = "
"
0344 | Case 7, 8, 26, 27, 34 |
0345 | strElement = ""
0346 | Case 22 |
0347 | strElement = "" |
0348 | If Wiki_Lang = 0 Then |
0349 | If Wiki_Script = 0 Then |
0350 | Else |
0351 | strElement = "+W" & Wiki_Script & "W+" |
0352 | End If |
0353 | Else |
0354 | strElement = "+W" & Wiki_Lang & "W+" |
0355 | If Wiki_Script = 0 Then |
0356 | Else |
0357 | strElement = strElement & " ←→ +W" & Wiki_Script & "W+" |
0358 | End If |
0359 | End If |
0360 | 'Set up a jump table |
0361 | strElement = strElement & "
Lesson Jump Table
"
0362 | For i = 1 To 5 |
0363 | If i > 1 Then |
0364 | strElement = strElement & " | "
0365 | End If |
0366 | strElement = strElement & ""
0367 | For j = 1 To 10 |
0368 | strElement = strElement & "" & 10 * (i - 1) + j & " | " |
0369 | Next j |
0370 | Next i |
0371 | strElement = strElement & " | |
" & Language & " - Lesson: 1" |
0372 | strLesson = "Lesson: " |
0373 | strTable_Saved = "
"
0374 | strElement = strElement & strTable_Saved |
0375 | Case 11, 31 |
0376 | strElement = ""
0377 | Case 12, 13, 37, 38 |
0378 | strElement = ""
0379 | Case 20 |
0380 | Select Case strParameter2_Local |
0381 | Case 1, 2, 3, 4 |
0382 | strElement = ""
0383 | Case 5 |
0384 | strElement = ""
0385 | End Select |
0386 | Case 21 |
0387 | strElement = ""
0388 | If strParameter2_Local > 5 Then |
0389 | strElement = ""
0390 | End If |
0391 | If strParameter2_Local > 7 Then |
0392 | strElement = ""
0393 | End If |
0394 | If strParameter2_Local = 10 Then |
0395 | strElement = ""
0396 | End If |
0397 | strTable_Saved = strElement 'Save for later |
0398 | Select Case strParameter2_Local |
0399 | Case 3, 4, 5, 7, 8, 10 |
0400 | 'Set up a jump table by lesson |
0401 | strElement = "Lesson Jump Table
"
0402 | For i = 1 To 5 |
0403 | If i > 1 Then |
0404 | strElement = strElement & " | "
0405 | End If |
0406 | strElement = strElement & ""
0407 | For j = 1 To 10 |
0408 | strElement = strElement & "" & 10 * (i - 1) + j & " | " |
0409 | Next j |
0410 | Next i |
0411 | strElement = strElement & " | |
Lesson: 1" |
0412 | strLesson = "Lesson: " |
0413 | strElement = strElement & "
" & strTable_Saved |
0414 | Case Else |
0415 | 'Set up a jump table by Category |
0416 | strQuery2 = "SELECT Ling_English_Category_Extras.Category FROM Ling_English_Category_Extras GROUP BY Ling_English_Category_Extras.Category ORDER BY Ling_English_Category_Extras.Category;" |
0417 | Set rs_Temp = CurrentDb.OpenRecordset(strQuery2) |
0418 | If Not rs_Temp.EOF Then |
0419 | strElement = "Category Jump Table
"
0420 | rs_Temp.MoveFirst |
0421 | For i = 1 To 4 |
0422 | If i > 1 Then |
0423 | strElement = strElement & " | "
0424 | End If |
0425 | strElement = strElement & ""
0426 | For j = 1 To 7 |
0427 | strElement = strElement & "" & Replace(rs_Temp.Fields(0), " ", "") & " | " |
0428 | If Not rs_Temp.EOF Then |
0429 | rs_Temp.MoveNext |
0430 | Else |
0431 | strElement = strElement & " | " |
0432 | End If |
0433 | Next j |
0434 | Next i |
0435 | rs_Temp.MoveFirst |
0436 | strElement = strElement & " | |
" & rs_Temp.Fields(0) & "" |
0437 | End If |
0438 | strElement = strElement & "
" & strTable_Saved |
0439 | Set rs_Temp = Nothing |
0440 | strLesson = "" |
0441 | End Select |
0442 | Case 39, 40 |
0443 | strElement = ""
0444 | Case Else |
0445 | strElement = ""
0446 | End Select |
0447 | strTable_Local = strTable_Local & strElement |
0448 | 'Set up Table Headings |
0449 | strElement = ""
0450 | For i = 1 To iCols |
0451 | strCell = rs.Fields(i - 1).Name |
0452 | Select Case strParameter |
0453 | Case 3 |
0454 | If i = 1 Then |
0455 | strElement = strElement & "" & strCell & " | " |
0456 | Else |
0457 | strElement = strElement & "" & strCell & " | " |
0458 | End If |
0459 | Case 7 |
0460 | If i = 1 Or i = 5 Then |
0461 | strElement = strElement & "" & strCell & " | " |
0462 | Else |
0463 | strElement = strElement & "" & strCell & " | " |
0464 | End If |
0465 | Case 8 |
0466 | If i = 1 Or i = 2 Then |
0467 | strElement = strElement & "" & strCell & " | " |
0468 | Else |
0469 | strElement = strElement & "" & strCell & " | " |
0470 | End If |
0471 | Case 11 |
0472 | If i = 4 Then |
0473 | strElement = strElement & "" & strCell & " | " |
0474 | Else |
0475 | strElement = strElement & "" & strCell & " | " |
0476 | End If |
0477 | Case 15, 17, 18, 23, 24, 25, 27, 28, 29, 30, 32, 34 |
0478 | strElement = strElement & "" & strCell & " | " |
0479 | Case 20 |
0480 | Col_Width = Round(100 / iCols, 1) |
0481 | strElement = strElement & "" & strCell & " | " |
0482 | Case 21 |
0483 | Select Case strParameter2_Local |
0484 | Case 1, 4, 6 'Case 7 moved to next list 06/07/24 |
0485 | If i > 2 Then |
0486 | strCell = Mid(strCell, 4) |
0487 | End If |
0488 | Case 2, 5, 7, 8, 9 |
0489 | If i > 3 Then |
0490 | strCell = Mid(strCell, 4) |
0491 | End If |
0492 | Case 3, 10 |
0493 | If i > 5 Then |
0494 | strCell = Mid(strCell, 4) |
0495 | End If |
0496 | End Select |
0497 | strElement = strElement & "" & strCell & " | " |
0498 | Case 22 |
0499 | If i = 2 Or i = 3 Then |
0500 | strElement = strElement & "" & strCell & " | " |
0501 | Else |
0502 | strElement = strElement & "" & strCell & " | " |
0503 | End If |
0504 | Case 26 |
0505 | strElement = strElement & "" & strCell & " | " |
0506 | Case 31, 43, 44, 45 |
0507 | strElement = strElement & "" & strCell & " | " |
0508 | Case 42 |
0509 | Select Case i |
0510 | Case 1 |
0511 | strElement = strElement & "" & " " & " | " |
0512 | Case 2 |
0513 | strElement = strElement & "" & strCell & " | " |
0514 | Case iCols |
0515 | strElement = strElement & "" & Left(strCell, Len(strCell) - 1) & " | " |
0516 | Case Else |
0517 | strElement = strElement & "" & strCell & " | " |
0518 | End Select |
0519 | Case Else |
0520 | strElement = strElement & "" & strCell & " | " |
0521 | End Select |
0522 | If i = iTotal_Col And strParameter <> 3 Then |
0523 | strElement = strElement & "TOTAL | " |
0524 | End If |
0525 | Next i |
0526 | strElement = strElement & " | " |
0527 | strHeader = strElement & Chr$(10) |
0528 | If strParameter = 30 Or strParameter = 30 Then 'Err .... ******************** |
0529 | strElement = "" |
0530 | End If |
0531 | strTable_Local = strTable_Local & strElement & Chr$(10) |
0532 | 'Set up Table Rows |
0533 | strCell_1_Saved = "" |
0534 | strCell_4_Saved = "" |
0535 | strElement = "" |
0536 | Do Until rs.EOF |
0537 | If strParameter = 11 Or strParameter = 22 Or strParameter = 21 Then |
0538 | If (strCell_1_Saved <> rs.Fields(0)) And (strElement <> "") Then |
0539 | If strParameter = 21 Or strParameter = 22 Then |
0540 | 'Close previous table |
0541 | strElement = strElement & strHeader 'Repeat the column headersstrParameter2_Local |
0542 | strElement = strElement & " |
" & IIf(strParameter = 21, "", Language & " - ") & strLesson & rs.Fields(0) & "" |
0543 | 'Open a new table |
0544 | strElement = strElement & strTable_Saved |
0545 | Else |
0546 | 'Insert a blank row |
0547 | strElement = strElement & ""
0548 | For i = 1 To iCols |
0549 | strElement = strElement & " | " |
0550 | Next i |
0551 | strElement = strElement & " | " |
0552 | End If |
0553 | 'Insert the header row |
0554 | strElement = strElement & strHeader |
0555 | End If |
0556 | End If |
0557 | j = 0 |
0558 | For i = 1 To iCols |
0559 | strCell = "" |
0560 | Select Case i |
0561 | Case 1 |
0562 | strWork = ""
0563 | strCell = rs.Fields(0) & "" |
0564 | If strParameter = 7 Or strParameter = 8 Or strParameter = 11 Or strParameter = 22 Or strParameter = 24 Or strParameter = 30 Or strParameter = 21 Then |
0565 | If (strCell_1_Saved = strCell) And strCell & "" <> "" Then |
0566 | strCell = "↑↑↑" |
0567 | Else |
0568 | strCell_1_Saved = strCell |
0569 | If strParameter = 11 Or strParameter = 22 Then |
0570 | strCell = "+R" & strCell & IIf(strParameter = 22 And Val(strParameter2_Local) > 2, "Dialogue", "") & "R+" & "" & strCell & "" |
0571 | Else |
0572 | If strParameter = 30 Then |
0573 | strWork = Mid(strCell, 2, InStr(strCell, "]") - 2) |
0574 | strWork = "PDFs_" & Replace(strWork, " ", "") |
0575 | strWork = Left(strWork, 20) |
0576 | strWork = " | |
+R" & strWork & "R+" & strHeader & ""
0577 | End If |
0578 | End If |
0579 | End If |
0580 | If (strParameter = 11 And rs.Fields(1) <> 0) Or strParameter = 22 Then |
0581 | strCell = "+R" & rs.Fields(1) & IIf(strParameter = 22 And Val(strParameter2_Local) > 2, "Dialogue", "") & "R+ " & strCell |
0582 | End If |
0583 | strElement = strElement & strWork & "" & strCell & " | " |
0584 | Else |
0585 | strElement = strElement & strWork |
0586 | If strParameter = 3 Or strParameter = 26 Or strParameter = 27 Or strParameter = 28 Or strParameter = 29 Or strParameter = 32 Or strParameter = 34 Then |
0587 | If strParameter = 26 Then |
0588 | strCell = "..\..\" & strCell |
0589 | strWork2 = Link_Narr_Gen(strCell) & "" |
0590 | If strWork2 = "" Then |
0591 | strWork2 = strCell |
0592 | End If |
0593 | strCell = "" & strWork2 & "" |
0594 | strElement = strElement & "" & strCell & " | " |
0595 | Else |
0596 | strElement = strElement & "" & strCell & " | " |
0597 | End If |
0598 | Else |
0599 | If strParameter = 15 Or strParameter = 17 Or strParameter = 18 Or strParameter = 23 Or strParameter = 24 Or strParameter = 25 Or strParameter = 30 Or strParameter = 31 Or strParameter = 43 Or strParameter = 44 Or strParameter = 45 Then |
0600 | strElement = strElement & "" & strCell & " | " |
0601 | Else |
0602 | strElement = strElement & "" & strCell & " | " |
0603 | End If |
0604 | End If |
0605 | End If |
0606 | Case Else |
0607 | strCell = rs.Fields(i - 1) & "" |
0608 | If Len(strCell) = 0 Then |
0609 | strCell = " " |
0610 | Else |
0611 | If strParameter = 3 Then |
0612 | If i > 6 Then |
0613 | strCell = Round(strCell, 2) |
0614 | End If |
0615 | End If |
0616 | If i <= iTotal_Col Then |
0617 | j = j + Val(strCell) |
0618 | End If |
0619 | k(i) = k(i) + Val(strCell) |
0620 | If strParameter <> 3 And strParameter <> 26 And strParameter <> 28 And strParameter <> 29 And strParameter <> 32 Then |
0621 | OK = Number_Format(strCell) |
0622 | End If |
0623 | End If |
0624 | If (i = 5 And strParameter = 7) Or (i = 2 And strParameter = 15) Or (i = 2 And strParameter = 17) Or (i = 2 And strParameter = 18) Then |
0625 | If strCell_4_Saved = strCell Then |
0626 | strCell = "↑↑↑" |
0627 | Else |
0628 | strCell_4_Saved = strCell |
0629 | End If |
0630 | End If |
0631 | If i = 3 And strParameter = 3 Then |
0632 | If strCell = "-" Then |
0633 | strCell = " " |
0634 | Else |
0635 | strCell = Oboe_File_Links_List(strCell) |
0636 | End If |
0637 | End If |
0638 | If (strParameter = 3 And i > 1) Or (strParameter = 7 And i < 5) Or (strParameter = 8 And i > 2) Or (strParameter = 11 And i < 4) Then |
0639 | strElement = strElement & "" & strCell & " | " |
0640 | Else |
0641 | If strParameter = 11 And i = 4 Then |
0642 | If rs.Fields(1) = "0" Then |
0643 | strCell = "Administration|..||.|" & strCell & ": " & Language_Animadversion_Reference_List(rs.Fields(0)) |
0644 | 'Add old time |
0645 | strCell = strCell & Subject_Hours_List(rs.Fields(0)) |
0646 | strQuery = "SELECT Language_Location_Primer.Language_Key, Language_Location_Primer.Ling_Progress, Language_Location_Primer.Ling_Vocab_Note, Language_Location_Primer.Ling_Dialogue_Note, Language_Location_Primer.Wiki_Language, Language_Location_Primer.Wiki_Script FROM Language_Location_Primer WHERE (((Language_Location_Primer.Language_Key)=""" & rs.Fields(0) & """));" |
0647 | Set rs_Temp = CurrentDb.OpenRecordset(strQuery) |
0648 | rs_Temp.MoveFirst |
0649 | If rs_Temp.Fields(1) > 0 Then |
0650 | 'Add latest Ling Lesson |
0651 | strCell = strCell & "|.|Latest Ling Lesson Studied: " & rs_Temp.Fields(1) |
0652 | 'Add Links to Ling XTabs |
0653 | strCell = strCell & "|.|Links to Aeon Comparative Database: |99|" |
0654 | strCell = strCell & "|1|Vocabulary++" & rs_Temp.Fields(2) & "++|1|Dialogues++" & rs_Temp.Fields(3) & "++" |
0655 | strCell = strCell & "|99|" |
0656 | End If |
0657 | If rs_Temp.Fields(4) > 0 Then |
0658 | strCell = strCell & "|.|+W" & rs_Temp.Fields(4) & "W+" |
0659 | End If |
0660 | If rs_Temp.Fields(5) > 0 Then |
0661 | strCell = strCell & "|.|+W" & rs_Temp.Fields(5) & "W+" |
0662 | End If |
0663 | 'Finish off |
0664 | Set rs_Temp = Nothing |
0665 | strCell = strCell & "|..|" |
0666 | Else |
0667 | strCell = Language_Animadversion_Translate(strCell, rs.Fields(0)) |
0668 | End If |
0669 | End If |
0670 | If (strParameter = 7 And i = 5) Or (strParameter = 8 And i = 2) Or (strParameter = 11 And i = 4) Or strParameter = 15 Or strParameter = 17 Or strParameter = 18 Or strParameter = 22 Or strParameter = 30 Or (strParameter = 21 And (Val(strParameter2_Local) <> 3)) Then |
0671 | strElement = strElement & "" & strCell & " | " |
0672 | Else |
0673 | If strParameter = 23 Then |
0674 | If i = 2 Or i = 4 Or i = 7 Then |
0675 | strElement = strElement & "" & strCell & " | " |
0676 | Else |
0677 | strElement = strElement & "" & strCell & " | " |
0678 | End If |
0679 | Else |
0680 | If strParameter = 24 Or strParameter = 25 Or strParameter = 28 Or strParameter = 29 Or strParameter = 31 Or strParameter = 32 Or strParameter = 44 Or strParameter = 45 Then |
0681 | strElement = strElement & "" & strCell & " | " |
0682 | Else |
0683 | If strParameter = 26 Then |
0684 | Select Case i |
0685 | Case 2, 3 |
0686 | strElement = strElement & "" & strCell & " | " |
0687 | Case 4 |
0688 | OK = Number_Format(strCell) |
0689 | strElement = strElement & "" & strCell & " | " |
0690 | Case 5 |
0691 | strCell = " " |
0692 | m = InStr(rs.Fields(0), "NotesPrint_") |
0693 | If m > 0 Then |
0694 | m = m + 11 |
0695 | n = InStr(m, rs.Fields(0), "_") |
0696 | If n > 0 Then |
0697 | m = Mid(rs.Fields(0), m, n - m) |
0698 | strCell = "[Note Link]++" & m & "++" |
0699 | End If |
0700 | End If |
0701 | strElement = strElement & "" & strCell & " | " |
0702 | End Select |
0703 | Else |
0704 | If strParameter = 43 Then |
0705 | Select Case i |
0706 | Case 3, 5 |
0707 | strElement = strElement & "" & strCell & " | " |
0708 | Case Else |
0709 | strElement = strElement & "" & strCell & " | " |
0710 | End Select |
0711 | Else |
0712 | strElement = strElement & "" & strCell & " | " |
0713 | End If |
0714 | End If |
0715 | End If |
0716 | End If |
0717 | End If |
0718 | End If |
0719 | If i = iTotal_Col Then |
0720 | 'Row Total |
0721 | strCell = j |
0722 | If strParameter <> 3 Then |
0723 | OK = Number_Format(strCell) |
0724 | strElement = strElement & "" & strCell & " | " |
0725 | End If |
0726 | k(iCols + 1) = k(iCols + 1) + j |
0727 | End If |
0728 | End Select |
0729 | Next i |
0730 | strElement = strElement & " | " & Chr$(10)
0731 | rs.MoveNext |
0732 | Loop |
0733 | strTable_Local = strTable_Local & strElement |
0734 | 'Set up Total Line |
0735 | If iCols >= iTotal_Col Then 'Allow for no Total Row |
0736 | If strParameter = 3 Then |
0737 | strElement = "TOTALS → | "
0738 | Else |
0739 | strElement = "TOTAL | "
0740 | End If |
0741 | For i = 2 To iCols |
0742 | strCell = k(i) |
0743 | If strParameter <> 3 Then |
0744 | OK = Number_Format(strCell) |
0745 | End If |
0746 | If strCell = 0 Then |
0747 | strCell = " " |
0748 | End If |
0749 | If strParameter = 3 Then |
0750 | If i < 5 Then |
0751 | strElement = strElement & "" & " " & " | " |
0752 | Else |
0753 | strElement = strElement & "" & strCell & " | " |
0754 | End If |
0755 | Else |
0756 | strElement = strElement & "" & strCell & " | " |
0757 | If i = iTotal_Col Then |
0758 | strCell = k(iCols + 1) |
0759 | OK = Number_Format(strCell) |
0760 | strElement = strElement & "" & strCell & " | " |
0761 | End If |
0762 | End If |
0763 | Next i |
0764 | strElement = strElement & "" & Chr$(10)
0765 | strTable_Local = strTable_Local & strElement |
0766 | End If |
0767 | 'Set up Table Footer |
0768 | If strParameter = 3 Or strParameter = 11 Or strParameter = 22 Or (strParameter = 21 And (Val(strParameter2_Local) <> 3)) Then |
0769 | strTable_Local = strTable_Local & strHeader 'Repeat the column headers |
0770 | End If |
0771 | strElement = " | | | | " |
0772 | strTable_Local = strTable_Local & strElement |
0773 | 'Tidy up and exit |
0774 | Functor_21 = "Yes" |
0775 | strTable = strTable_Local |
0776 | Set rs = Nothing |
0777 | End Function |
Procedures Calling This Procedure (Functor_21)
- Auto_Reference_Notes (From Lines 896, 898)
- Functor (From Line 183)
Procedures Called By This Procedure (Functor_21)
Tables / Queries / Fragments Directly Used By This Procedure (Functor_21)
- Auto_Ref_Notes_Stats_Detailed (Query, used in Line 52)
- Auto_Ref_Notes_Stats_Grand_Summary (Query, used in Line 65)
- Auto_Ref_Notes_Stats_Grandest_Summary (Query, used in Line 68)
- Auto_Ref_Notes_Stats_Summary (Query, used in Line 48)
- Bible_Reading_Progress (Query, used in Line 248)
- BookPaperControl_List (Query, used in Line 263)
- Books_To_Regen (Table, used in Line 221)
- Cross_Reference_By_Type (Query, used in Line 39)
- Cross_Reference_Changes_By_Type (Query, used in Line 42)
- Day_Plan_M1 (Table, used in Line 283)
- Day_Plan_M2 (Table, used in Line 285)
- Day_Plan_M3 (Table, used in Line 287)
- Duplicate_Papers (Query, used in Line 239)
- Functor_Calls (Query, used in Line 55)
- Functors_FbyN (Query, used in Line 59)
- Functors_NbyF (Query, used in Line 63)
- IdentityBooks_Unreferenced (Query, used in Line 102)
- IdentityBooks_Unreferenced_Gen (Query, used in Line 103)
- IdentityPapersRead_Unreferenced (Query, used in Line 92)
- IdentityPapersRead_Unreferenced_Gen (Query, used in Line 93)
- Journals_List (Query, used in Line 291)
- Language_Animadversions_List (Query, used in Line 80)
- Language_Animadversions_XTab (Query, used in Line 83)
- Language_Animadversions_XTab_Pri2 (Query, used in Line 86)
- Language_Animadversions_XTab_Pri3 (Query, used in Line 266)
- Language_Animadversions_XTab_Pri4 (Query, used in Line 269)
- Language_Location_Primer (Table, used in Lines 181, 185, 206, 646)
- Language_Location_Primer_Date_Time_Updt (Query, used in Line 78)
- Language_Location_Primer_Time_Zap (Query, used in Line 76)
- Large_Page_List (Query, used in Line 233)
- Ling_Combined_XTab (Query, used in Line 118)
- Ling_Crosstab_Group_Control (Table, used in Lines 135, 137)
- Ling_Database_Summary_XTab_Dialogue_Latin (Query, used in Line 114)
- Ling_Database_Summary_XTab_Dialogue_NonLatin (Query, used in Line 116)
- Ling_Database_Summary_XTab_Vocabulary_Latin (Query, used in Line 110)
- Ling_Database_Summary_XTab_Vocabulary_NonLatin (Query, used in Line 112)
- Ling_Dodgy_Vocab (Query, used in Line 278)
- Ling_English_Category_Extras (Table, used in Line 416)
- Ling_Language_Dialogue_List (Query, used in Line 163)
- Ling_Language_Dialogue_List_All (Query, used in Line 128)
- Ling_Language_Dialogue_List_Latin (Query, used in Line 192)
- Ling_Language_Dialogue_List_Latin_Reduced (Query, used in Line 175)
- Ling_Language_Dialogue_List_NonLatin (Query, used in Line 190)
- Ling_Language_Dialogue_List_NonLatin_Reduced (Query, used in Line 177)
- Ling_Language_Vocab_List_All (Query, used in Line 124)
- Ling_Language_Vocab_List_All_Grouped (Query, used in Line 151)
- Ling_Language_Vocab_List_All_Grouped_LessonSeq (Query, used in Line 147)
- Ling_Language_Vocab_List_All_LessonSeq (Query, used in Line 130)
- Ling_Language_Vocab_List_Latin (Query, used in Line 202)
- Ling_Language_Vocab_List_Latin_Reduced (Query, used in Line 171)
- Ling_Language_Vocab_List_NonLatin (Query, used in Line 200)
- Ling_Language_Vocab_List_NonLatin_Reduced (Query, used in Line 173)
- Ling_Language_Vocab_Phrase_List (Query, used in Line 159)
- Ling_Language_Vocab_Phrase_List_All (Query, used in Line 126)
- Ling_Language_Vocab_Phrase_List_All_LessonSeq (Query, used in Line 132)
- Ling_Language_Vocab_Phrase_List_LessonSeq (Query, used in Line 155)
- LRB_Files_List (Query, used in Line 297)
- LRB_XTab (Query, used in Line 294)
- Missing_Webref_DisplayText_List (Query, used in Line 242)
- Missing_Webref_DisplayText_List_Books (Query, used in Line 251)
- Oboe_Practice_Hours_List (Query, used in Line 45)
- Papers_Inconsistently_Electronic (Query, used in Line 257)
- PDF_Missing_List (Query, used in Line 236)
- PID_Books_To_Regen (Query, used in Line 223)
- PID_Missing_Online_Papers_List (Query, used in Line 245)
- PID_Missing_Online_Papers_List_Summary (Query, used in Line 254)
- PID_Notes_RL_Category_Xtab (Query, used in Line 106)
- PID_Notes_Used_By_Thesis_Chapter_List_XTab (Query, used in Line 96)
- PID_Notes_Used_By_Thesis_Chapter_XTab (Query, used in Line 89)
- PID_Papers_Filed_Not_Referenced (Query, used in Line 224)
- PID_Papers_Referenced_No_Abstract (Query, used in Line 230)
- PID_Papers_Referenced_Undated (Query, used in Line 227)
- Temp_Lang_Date_Last_Study (Table, used in Line 72)
- Temp_Lang_Date_Last_Study_GEN (Query, used in Line 74)
- Time_By_Weekday_QTD (Query, used in Line 275)
- Time_By_Weekday_YTD (Query, used in Line 272)
- Website_Regen_Control_List (Query, used in Line 260)
- Works_Missing_By_Thesis_Chapter (Query, used in Line 99)
Go To Start of This Procedure
Go To Top of This Page
Link to VBA Code Control Page
Source Code of: Functor_22 Procedure Type: Public Function Module: Functors Lines of Code: 356
Go To End of This Procedure
Line-No. / Ref. | Code Line |
0001 | Public Function Functor_22(strParameter, strList, Note_ID, str_Parameter_2, Optional str_Parameter_3, Optional str_Parameter_4) 'str_Parameter_3 & _4 to be used for recursion |
0002 | 'This function formats a list (together with surrounding narrative) from a query |
0003 | Dim rs As Recordset |
0004 | Dim strList_Local As String |
0005 | Dim strElement As String |
0006 | Dim strCell As String |
0007 | Dim strQuery As String |
0008 | Dim strUpdtQuery As String |
0009 | Dim BP As String |
0010 | Dim FN As String |
0011 | Dim str_Parameter_2_Local As String |
0012 | Dim str_Parameter_3_Local As String |
0013 | Dim str_Parameter_4_Local As String |
0014 | Dim strPara2 As String |
0015 | Dim strPara3 As String |
0016 | Dim Item_Year As String |
0017 | Dim Write_Up_Note As Long |
0018 | Dim Field_1 As String |
0019 | Dim Field_2 As String |
0020 | Dim Field_3 As String |
0021 | Dim Field_4 As String |
0022 | Dim Chapter_FieldName As String |
0023 | str_Parameter_2_Local = str_Parameter_2 & "" |
0024 | If IsMissing(str_Parameter_3) Then |
0025 | str_Parameter_3_Local = "" |
0026 | Else |
0027 | str_Parameter_3_Local = str_Parameter_3 & "" |
0028 | End If |
0029 | If IsMissing(str_Parameter_4) Then |
0030 | str_Parameter_4_Local = "" |
0031 | Else |
0032 | str_Parameter_4_Local = str_Parameter_4 & "" |
0033 | End If |
0034 | strPara3 = "" |
0035 | 'For Cases 6 to 7 ... Note that this processing is performed for cases 8 & 9 on re-entry |
0036 | If strParameter >= 6 And strParameter <= 7 Then |
0037 | If automatic_processing <> "Yes" Then |
0038 | 'Check Books & Papers on PID_Note_Reading_Lists exist! |
0039 | Set rs = CurrentDb.OpenRecordset("PID_Note_Reading_Lists_Books_Chk") |
0040 | If Not rs.EOF Then |
0041 | DoCmd.OpenQuery ("PID_Note_Reading_Lists_Books_Chk") |
0042 | End If |
0043 | Set rs = Nothing |
0044 | Set rs = CurrentDb.OpenRecordset("PID_Note_Reading_Lists_Papers_Chk") |
0045 | If Not rs.EOF Then |
0046 | DoCmd.OpenQuery ("PID_Note_Reading_Lists_Papers_Chk") |
0047 | End If |
0048 | Set rs = Nothing |
0049 | 'Add new rows to PID_Note_Reading_Lists |
0050 | DoCmd.OpenQuery ("PID_Notes_Books_Referenced_Gen") |
0051 | DoCmd.OpenQuery ("PID_Notes_Papers_Referenced_Gen") |
0052 | DoCmd.OpenQuery ("IdentityBooks_Unreferenced_Gen") |
0053 | DoCmd.OpenQuery ("IdentityPapersRead_Unreferenced_Gen") |
0054 | ' Update/add the authors, titles and the "read" & "annotation" status of the papers on PID_Note_Reading_Lists |
0055 | strUpdtQuery = "UPDATE PID_Note_Reading_Lists INNER JOIN Papers ON PID_Note_Reading_Lists.Called_ID = Papers.ID SET PID_Note_Reading_Lists.[Percent_Read] = Papers.[Actual - Total] / Papers.Estimate * 100, PID_Note_Reading_Lists.[Read?] = [Papers]![Read?], PID_Note_Reading_Lists.Author = [Papers]![Author], PID_Note_Reading_Lists.Title = [Papers]![Title], PID_Note_Reading_Lists.[Annotations?] = [Papers]![Annotations?], PID_Note_Reading_Lists.[Abstract_Null?] = IIf([Abstract] & """"="""",True,False), PID_Note_Reading_Lists.[Link_Internal?] = IIf(InStr([Comments] & """",""+F"")>0,True,False), PID_Note_Reading_Lists.[Link_External?] = IIf(InStr([Comments] & """",""+W"")>0,True,False) WHERE (((PID_Note_Reading_Lists.[Book/Paper])=""Paper"") AND ((PID_Note_Reading_Lists.Note_ID)=" & Note_ID & "));" |
0056 | DoCmd.RunSQL (strUpdtQuery) |
0057 | ' Update/add the authors, titles and the "read" status of the books on PID_Note_Reading_Lists |
0058 | strUpdtQuery = "UPDATE PID_Note_Reading_Lists INNER JOIN Books ON PID_Note_Reading_Lists.Called_ID = Books.ID1 SET PID_Note_Reading_Lists.[Percent_Read] = Books.[Actual - Total] / Books.Estimate * 100, PID_Note_Reading_Lists.[Read?] = [Books]![Read?], PID_Note_Reading_Lists.Author = [Books]![Author], PID_Note_Reading_Lists.Title = [Books]![Title] WHERE (((PID_Note_Reading_Lists.[Book/Paper])=""Book"") AND ((PID_Note_Reading_Lists.Note_ID)=" & Note_ID & "));" |
0059 | DoCmd.RunSQL (strUpdtQuery) |
0060 | 'Update to show Write-up Notes |
0061 | strUpdtQuery = "UPDATE PID_Note_Reading_Lists INNER JOIN Papers ON PID_Note_Reading_Lists.Called_ID = Papers.ID SET PID_Note_Reading_Lists.[Write-Up?] = [Papers]![Write_Up_Note_ID] WHERE (((Papers.Write_Up_Note_ID)>0) AND ((PID_Note_Reading_Lists.[Book/Paper])=""Paper"") AND ((PID_Note_Reading_Lists.Note_ID)=" & Note_ID & "));" |
0062 | DoCmd.RunSQL (strUpdtQuery) |
0063 | End If |
0064 | 'Check if R/L to be de-duplicated |
0065 | If str_Parameter_3_Local = "De-Duplicate" Then |
0066 | 'Determine the column name in PID_Note_Reading_Lists table |
0067 | strQuery = "SELECT Thesis_Chapters.ID, Thesis_Chapters.Chapter FROM Thesis_Chapters WHERE (((Thesis_Chapters.ID)=" & str_Parameter_4 & "));" |
0068 | Set rs = CurrentDb.OpenRecordset(strQuery) |
0069 | If Not rs.EOF Then |
0070 | rs.MoveFirst |
0071 | Chapter_FieldName = rs.Fields(1) |
0072 | Chapter_FieldName = "Ch_" & Chapter_FieldName & "_Ist_Note" |
0073 | strPara3 = " AND ((PID_Note_Reading_Lists." & Chapter_FieldName & ")<>999999)" |
0074 | End If |
0075 | Set rs = Nothing |
0076 | End If |
0077 | End If |
0078 | 'For Cases 6 to 9 ... |
0079 | If strParameter >= 6 And strParameter <= 9 Then |
0080 | 'Over-ride Parameter_2 (Category) if requested, else select only that Category |
0081 | If str_Parameter_2_Local = "*ALL*" Then |
0082 | strPara2 = "" |
0083 | Else |
0084 | If str_Parameter_2_Local = "" Then |
0085 | strPara2 = " AND ((PID_Note_Reading_Lists.Category) & """" = """")" |
0086 | Else |
0087 | strPara2 = " AND ((PID_Note_Reading_Lists.Category)=""" & str_Parameter_2_Local & """)" |
0088 | End If |
0089 | End If |
0090 | 'Adjust for items that have missed the cut |
0091 | If str_Parameter_3_Local = "" Then |
0092 | strPara3 = "" |
0093 | Else |
0094 | If str_Parameter_3_Local = "1" Or str_Parameter_3_Local = "De-Duplicate" Then |
0095 | strPara3 = " AND ((PID_Note_Reading_Lists.[Missed_Cut?]) = False)" |
0096 | Else |
0097 | strPara3 = " AND ((PID_Note_Reading_Lists.[Missed_Cut?]) = True)" |
0098 | End If |
0099 | End If |
0100 | End If |
0101 | Select Case strParameter |
0102 | Case 1 |
0103 | strQuery = "Cross_Reference_By_Year" |
0104 | strElement = "However, there are (as of " & Now() & ", using +CFunctor_22C+ & query +QCross_Reference_By_YearQ+) the following counts of records on the table with timestamps in the years below:- " |
0105 | Case 2 |
0106 | strQuery = "Cross_Reference_Changes_By_Year" |
0107 | strElement = "" |
0108 | Case 3 |
0109 | DoCmd.OpenQuery ("Functor_Descriptions_GEN") |
0110 | strQuery = "Functor_Descriptions_List" |
0111 | strElement = "" |
0112 | Case 4 |
0113 | strQuery = "Cross_Reference_Changes_By_Month" |
0114 | strElement = "" |
0115 | Case 5 |
0116 | strQuery = "PID_Notes_Unused_By_Thesis" |
0117 | strElement = "" |
0118 | Case 6 |
0119 | strQuery = "SELECT PID_Note_Reading_Lists.[Book/Paper], PID_Note_Reading_Lists.Called_ID, PID_Note_Reading_Lists.Footnote, PID_Note_Reading_Lists.Author, PID_Note_Reading_Lists.Title, PID_Note_Reading_Lists.Item_Year, PID_Note_Reading_Lists.[Write-Up?], PID_Note_Reading_Lists.[Annotations?], PID_Note_Reading_Lists.[Abstract_Null?], PID_Note_Reading_Lists.[Link_External?], PID_Note_Reading_Lists.[Link_Internal?], PID_Note_Reading_Lists.[Percent_Read], PID_Note_Reading_Lists.[Reason_Missed_Cut] FROM PID_Note_Reading_Lists WHERE (((PID_Note_Reading_Lists.Note_ID) = " & Note_ID & ") And ((PID_Note_Reading_Lists.[Read?]) = Yes) And ((PID_Note_Reading_Lists.[Suppress?]) = No)" & strPara2 & strPara3 & ") ORDER BY PID_Note_Reading_Lists.Author, PID_Note_Reading_Lists.Title;" |
0120 | strElement = "" |
0121 | Case 7 |
0122 | strQuery = "SELECT PID_Note_Reading_Lists.[Book/Paper], PID_Note_Reading_Lists.Called_ID, PID_Note_Reading_Lists.Footnote, PID_Note_Reading_Lists.Author, PID_Note_Reading_Lists.Title, PID_Note_Reading_Lists.Item_Year, PID_Note_Reading_Lists.[Write-Up?], PID_Note_Reading_Lists.[Annotations?], PID_Note_Reading_Lists.[Abstract_Null?], PID_Note_Reading_Lists.[Link_External?], PID_Note_Reading_Lists.[Link_Internal?], PID_Note_Reading_Lists.[Percent_Read], PID_Note_Reading_Lists.[Reason_Missed_Cut] FROM PID_Note_Reading_Lists WHERE (((PID_Note_Reading_Lists.Note_ID) = " & Note_ID & ") And ((PID_Note_Reading_Lists.[Read?]) = No) And ((PID_Note_Reading_Lists.[Suppress?]) = No)" & strPara2 & strPara3 & ") ORDER BY PID_Note_Reading_Lists.Author, PID_Note_Reading_Lists.Title;" |
0123 | strElement = "" |
0124 | Case 8 |
0125 | If str_Parameter_2_Local = "" Then |
0126 | strQuery = "SELECT PID_Note_Reading_Lists.Category FROM PID_Note_Reading_Lists WHERE (((PID_Note_Reading_Lists.Note_ID) = " & Note_ID & ") And ((PID_Note_Reading_Lists.[Suppress?]) = No) " & strPara3 & " And ((PID_Note_Reading_Lists.[Read?]) = Yes)) GROUP BY PID_Note_Reading_Lists.Category ORDER BY PID_Note_Reading_Lists.Category;" |
0127 | Else |
0128 | strQuery = "SELECT Mid([Category],Len(""" & str_Parameter_2_Local & """)+1) AS Expr2 FROM PID_Note_Reading_Lists WHERE (((PID_Note_Reading_Lists.Note_ID) = " & Note_ID & ") And ((PID_Note_Reading_Lists.[Suppress?]) = No) " & strPara3 & " And ((PID_Note_Reading_Lists.[Read?]) = Yes) And ((Left([Category], Len(""" & str_Parameter_2_Local & """))) = """ & str_Parameter_2_Local & """)) GROUP BY Mid([Category],Len(""" & str_Parameter_2_Local & """)+1) ORDER BY Mid([Category],Len(""" & str_Parameter_2_Local & """)+1);" |
0129 | End If |
0130 | strElement = "" |
0131 | Case 9 |
0132 | If str_Parameter_2_Local = "" Then |
0133 | strQuery = "SELECT PID_Note_Reading_Lists.Category FROM PID_Note_Reading_Lists WHERE (((PID_Note_Reading_Lists.Note_ID) = " & Note_ID & ") And ((PID_Note_Reading_Lists.[Suppress?]) = No) " & strPara3 & " And ((PID_Note_Reading_Lists.[Read?]) = No)) GROUP BY PID_Note_Reading_Lists.Category ORDER BY PID_Note_Reading_Lists.Category;" |
0134 | Else |
0135 | strQuery = "SELECT Mid([Category],Len(""" & str_Parameter_2_Local & """)+1) AS Expr2 FROM PID_Note_Reading_Lists WHERE (((PID_Note_Reading_Lists.Note_ID) = " & Note_ID & ") And ((PID_Note_Reading_Lists.[Suppress?]) = No) " & strPara3 & " And ((PID_Note_Reading_Lists.[Read?]) = No) And ((Left([Category], Len(""" & str_Parameter_2_Local & """))) = """ & str_Parameter_2_Local & """)) GROUP BY Mid([Category],Len(""" & str_Parameter_2_Local & """)+1) ORDER BY Mid([Category],Len(""" & str_Parameter_2_Local & """)+1);" |
0136 | End If |
0137 | strElement = "" |
0138 | Case 10 |
0139 | If str_Parameter_2_Local = "Read" Then |
0140 | strPara2 = "((Functor_Usage.Functor_Option)=6 Or (Functor_Usage.Functor_Option)=8) " |
0141 | Else |
0142 | strPara2 = "((Functor_Usage.Functor_Option)=7 Or (Functor_Usage.Functor_Option)=9) " |
0143 | End If |
0144 | strQuery = "SELECT Thesis_Note_XRef.Thesis_Chapter_Note_ID, Thesis_Note_XRef.PID_Note_Seq, Thesis_Note_XRef.PID_Note_Category_1, Thesis_Note_XRef.PID_Note_Category_2, Thesis_Note_XRef.PID_Note_Category_3, Thesis_Note_XRef.PID_Note_Level, Thesis_Note_XRef.PID_Note_ID, Thesis_Note_XRef.PID_Note_Caption, Functor_Usage.Functor_Option, Functor_Usage.Functor_Parameter FROM Thesis_Note_XRef INNER JOIN Functor_Usage ON Thesis_Note_XRef.PID_Note_ID = Functor_Usage.Note_ID WHERE (" & strPara2 & " And ((Functor_Usage.Functor_ID) = 22) And ((Thesis_Note_XRef.Thesis_Chapter_Note_ID) = " & Note_ID & ") And ((Thesis_Note_XRef.[Exclude?]) = No)) ORDER BY Thesis_Note_XRef.PID_Note_Seq, Thesis_Note_XRef.PID_Note_Category_1, Thesis_Note_XRef.PID_Note_Category_2, Thesis_Note_XRef.PID_Note_Category_3, Thesis_Note_XRef.PID_Note_Level, Thesis_Note_XRef.PID_Note_Caption;" |
0145 | OK = Update_Thesis_Chapter_RLs(Note_ID) |
0146 | strElement = "" |
0147 | Case 11 |
0148 | strQuery = "PID_Notes_Unused_By_Thesis_Note_Lists" |
0149 | strElement = "" |
0150 | Case 12 |
0151 | strQuery = "PDF_File_List" |
0152 | strElement = "" |
0153 | Case 13 |
0154 | strQuery = "Thesis_Reading_List" |
0155 | strElement = "" |
0156 | Case 14 |
0157 | Select Case str_Parameter_2_Local |
0158 | Case "1" |
0159 | strQuery = "SELECT * FROM Thesis_Reading_List_Cited;" |
0160 | Case "2" |
0161 | strQuery = "SELECT * FROM Thesis_Reading_List_Cited_Note WHERE Note_ID = " & Note_ID & " ORDER BY Author, Title;" |
0162 | End Select |
0163 | strElement = "" |
0164 | Case 15 |
0165 | strQuery = "Aeon_Papers_Task_List" |
0166 | strElement = "" |
0167 | Case 16 |
0168 | strQuery = "qryTopTen" |
0169 | strElement = "" |
0170 | Case 17 |
0171 | strQuery = "qryDailyTasks" |
0172 | strElement = "" |
0173 | Case 18 |
0174 | strQuery = "BBC_2025_WebRefs" |
0175 | strElement = "" |
0176 | End Select |
0177 | Set rs = CurrentDb.OpenRecordset(strQuery) |
0178 | strList_Local = "" |
0179 | If rs.EOF Then |
0180 | Set rs = Nothing |
0181 | Debug.Print Now(); "- Functor_22: Option " & strParameter & " (Note = " & Note_ID & ") - No list to print" |
0182 | If strParameter = 6 Or strParameter = 7 Then |
0183 | strElement = "|ii|" |
0184 | strElement = strElement & "|1|No items to list. " |
0185 | strElement = strElement & "|ii|" |
0186 | Functor_22 = "Yes" |
0187 | strList = strElement |
0188 | Else |
0189 | If ((strParameter = 8 Or strParameter = 9) And str_Parameter_3_Local = "2") Or (strParameter = 14 And str_Parameter_2_Local = "2") Then |
0190 | Functor_22 = "Yes" |
0191 | strElement = strElement & "No items to list. " |
0192 | strList_Local = strList_Local & strElement |
0193 | strList = strList_Local |
0194 | Else |
0195 | Functor_22 = "No" |
0196 | End If |
0197 | End If |
0198 | Exit Function |
0199 | Else |
0200 | rs.MoveFirst |
0201 | End If |
0202 | 'Set up List Header |
0203 | Select Case strParameter |
0204 | Case 6, 7, 16, 17 |
0205 | strElement = strElement & "|ii|" |
0206 | Case 10 |
0207 | strElement = "|II|" |
0208 | Field_3 = "" |
0209 | Field_4 = "" |
0210 | Case 3, 5, 8, 9, 11, 12 |
0211 | strElement = "|##|" |
0212 | Case Else |
0213 | strElement = strElement & "|99|" |
0214 | End Select |
0215 | strList_Local = strList_Local & strElement |
0216 | strElement = "" |
0217 | Do Until rs.EOF |
0218 | Field_2 = "" |
0219 | Select Case strParameter |
0220 | Case 5, 11 |
0221 | strElement = strElement & "|.|" |
0222 | strElement = strElement & rs.Fields(0) |
0223 | Case 6, 7, 13, 14 |
0224 | strElement = strElement & "|1|" |
0225 | BP = Left(rs.Fields(0), 1) |
0226 | strElement = strElement & "+" & BP & rs.Fields(1) & BP & "+" |
0227 | Item_Year = rs.Fields(5) & "" |
0228 | If Item_Year <> "" Then |
0229 | strElement = strElement & ", " & Item_Year |
0230 | End If |
0231 | If BP = "B" Then |
0232 | strElement = strElement & ", " & "Book" |
0233 | End If |
0234 | Write_Up_Note = rs.Fields(6) |
0235 | If Write_Up_Note > 0 Then |
0236 | strElement = strElement & ", [Write-Up Note]++" & Write_Up_Note & "++" |
0237 | End If |
0238 | If rs.Fields(7) = True Then |
0239 | strElement = strElement & ", Annotations" |
0240 | End If |
0241 | If rs.Fields(8) = True And Write_Up_Note = 0 Then |
0242 | strElement = strElement & ", No Abstract" |
0243 | End If |
0244 | If rs.Fields(9) = True Then |
0245 | strElement = strElement & ", External Link" |
0246 | End If |
0247 | If rs.Fields(10) = True Then |
0248 | strElement = strElement & ", Internal PDF Link" |
0249 | End If |
0250 | If strParameter = 7 And rs.Fields(11) > 0 Then |
0251 | strElement = strElement & ", Read = " & rs.Fields(11) & "%" |
0252 | End If |
0253 | If strParameter = 13 Or strParameter = 14 Then |
0254 | If rs.Fields(12) = True Then |
0255 | strElement = strElement & ", Read" |
0256 | Else |
0257 | If rs.Fields(11) > 0 Then |
0258 | strElement = strElement & ", Read = " & rs.Fields(11) & "%" |
0259 | End If |
0260 | End If |
0261 | End If |
0262 | FN = rs.Fields(2) & "" |
0263 | If FN <> "" Then |
0264 | If (Len(FN) < 31) And InStr(FN, "|") = 0 And InStr(FN, "+") = 0 Then 'Allow for quick comment / characterisation, eg. "Aeon" or "August 2019" |
0265 | strElement = strElement & ", Note: " & FN |
0266 | Else |
0267 | If InStr(FN, "|") = 0 Then |
0268 | FN = "|..||.|" & FN & "|..|" |
0269 | End If |
0270 | strElement = strElement & ", Footnote++FN" & FN & "++" |
0271 | End If |
0272 | End If |
0273 | If str_Parameter_3_Local = "2" Then |
0274 | If rs.Fields(12) & "" <> "" Then |
0275 | strElement = strElement & ", Missed Cut: " & rs.Fields(12) |
0276 | End If |
0277 | End If |
0278 | Case 8, 9 |
0279 | strElement = strElement & "|.|" |
0280 | strElement = strElement & "" & IIf(rs.Fields(0) & "" = "", "General", rs.Fields(0)) & ": " |
0281 | OK = Functor_22(IIf(strParameter = 8, 6, 7), strCell, Note_ID, str_Parameter_2_Local & rs.Fields(0), str_Parameter_3_Local, str_Parameter_4_Local) |
0282 | strElement = strElement & strCell |
0283 | Case 10 |
0284 | If rs.Fields(3) & "" <> Field_4 Then |
0285 | If Field_4 <> "" Then |
0286 | Field_2 = Field_2 & "|oo|" |
0287 | End If |
0288 | If rs.Fields(3) & "" <> "" Then |
0289 | Field_2 = Field_2 & "|1|" & rs.Fields(3) |
0290 | End If |
0291 | Field_4 = rs.Fields(3) & "" |
0292 | If Field_4 <> "" Then |
0293 | Field_2 = Field_2 & "|oo|" |
0294 | End If |
0295 | End If |
0296 | If rs.Fields(2) & "" <> Field_3 Then |
0297 | If Field_3 <> "" Then |
0298 | Field_2 = Field_2 & "|AA|" |
0299 | End If |
0300 | If rs.Fields(2) & "" <> "" Then |
0301 | Field_2 = Field_2 & "|1|" & rs.Fields(2) & "|AA|" |
0302 | End If |
0303 | Field_3 = rs.Fields(2) & "" |
0304 | End If |
0305 | Field_1 = rs.Fields(5) |
0306 | Select Case Field_1 |
0307 | Case "1" |
0308 | Field_2 = Field_2 & "|1|" |
0309 | Case "2" |
0310 | Field_2 = Field_2 & "|1|" |
0311 | Case "3" |
0312 | Field_2 = Field_2 & "|.|" |
0313 | End Select |
0314 | Field_2 = Field_2 & "[" & rs.Fields(7) & "]++" & rs.Fields(6) & "++" |
0315 | strElement = strElement & Field_2 |
0316 | OK = Functor_22(rs.Fields(8), strCell, rs.Fields(6), rs.Fields(9) & "", "De-Duplicate", rs.Fields(0)) |
0317 | strElement = strElement & strCell |
0318 | Case 12 |
0319 | strElement = strElement & Chr$(10) |
0320 | strElement = strElement & "|.|" & "" & "" & rs.Fields(1) & ".pdf " & rs.Fields(0) |
0321 | Case 15, 16, 17, 18 |
0322 | strElement = strElement & "|1|" |
0323 | strElement = strElement & rs.Fields(0) |
0324 | Case Else |
0325 | strElement = strElement & "|.|" |
0326 | strElement = strElement & "" & rs.Fields(0) & ": " |
0327 | strCell = rs.Fields(1) |
0328 | OK = Number_Format(strCell) |
0329 | strElement = strElement & strCell |
0330 | End Select |
0331 | rs.MoveNext |
0332 | Loop |
0333 | strList_Local = strList_Local & strElement |
0334 | 'Set up End List ... this should probably be the same as the 'Start List', but isn't! |
0335 | Select Case strParameter |
0336 | Case 6, 7, 16, 17 |
0337 | strElement = "|ii|" |
0338 | Case 10 |
0339 | strElement = "" |
0340 | If Field_4 <> "" Then |
0341 | strElement = strElement & "|oo|" |
0342 | End If |
0343 | If Field_3 <> "" Then |
0344 | strElement = strElement & "|AA|" |
0345 | End If |
0346 | strElement = strElement & "|II|" |
0347 | Case 13, 14, 15, 18 |
0348 | strElement = "|99|" |
0349 | Case Else |
0350 | strElement = "|##|" |
0351 | End Select |
0352 | strList_Local = strList_Local & strElement |
0353 | Functor_22 = "Yes" |
0354 | strList = strList_Local |
0355 | Set rs = Nothing |
0356 | End Function |
Procedures Calling This Procedure (Functor_22)
Procedures Called By This Procedure (Functor_22)
Tables / Queries / Fragments Directly Used By This Procedure (Functor_22)
- Aeon_Papers_Task_List (Query, used in Line 165)
- BBC_2025_WebRefs (Query, used in Line 174)
- Cross_Reference_By_Year (Query, used in Line 103)
- Cross_Reference_Changes_By_Month (Query, used in Line 113)
- Cross_Reference_Changes_By_Year (Query, used in Line 106)
- Functor_Descriptions_GEN (Query, used in Line 109)
- Functor_Descriptions_List (Query, used in Line 110)
- Functor_Usage (Table, used in Lines 140, 142)
- IdentityBooks_Unreferenced_Gen (Query, used in Line 52)
- IdentityPapersRead_Unreferenced_Gen (Query, used in Line 53)
- PDF_File_List (Query, used in Line 151)
- PID_Note_Reading_Lists (Table, used in Lines 55, 58, 61, 73, 85, 87, 95, 97, 119, 122, 126, 128, 133, 135)
- PID_Note_Reading_Lists_Books_Chk (Query, used in Lines 39, 41)
- PID_Note_Reading_Lists_Papers_Chk (Query, used in Lines 44, 46)
- PID_Notes_Books_Referenced_Gen (Query, used in Line 50)
- PID_Notes_Papers_Referenced_Gen (Query, used in Line 51)
- PID_Notes_Unused_By_Thesis (Query, used in Line 116)
- PID_Notes_Unused_By_Thesis_Note_Lists (Query, used in Line 148)
- qryDailyTasks (Query, used in Line 171)
- qryTopTen (Query, used in Line 168)
- Thesis_Chapters (Query, used in Line 67)
- Thesis_Note_XRef (Table, used in Line 144)
- Thesis_Reading_List (Query, used in Line 154)
- Thesis_Reading_List_Cited (Query, used in Line 159)
- Thesis_Reading_List_Cited_Note (Query, used in Line 161)
Go To Start of This Procedure
Go To Top of This Page
Link to VBA Code Control Page
Source Code of: Functor_23 Procedure Type: Public Function Module: Functors Lines of Code: 309
Go To End of This Procedure
Line-No. / Ref. | Code Line |
0001 | Public Function Functor_23(Note_ID, strOption, strValue, Optional str_Parameter_2) |
0002 | 'For this function:- |
0003 | ' ... Options 1-14 & 21-24 return a value (together with surrounding narrative) from a query |
0004 | ' ... Options 15-19 produce an indented list from a query |
0005 | ' ... Option 20 produces the table for the Thesis Dashboard |
0006 | Dim rs As Recordset |
0007 | Dim strValue_Local As String |
0008 | Dim strElement As String |
0009 | Dim strMsg As String |
0010 | Dim strQuery As String |
0011 | Dim Field_1 As String |
0012 | Dim Field_2 As String |
0013 | Dim Field_3 As String |
0014 | Dim i As Integer |
0015 | Dim j As Integer |
0016 | Dim str_Parameter_2_Local As String |
0017 | Dim strPara2 As String |
0018 | Dim Note_Parameter As Integer |
0019 | If IsMissing(str_Parameter_2) Then |
0020 | str_Parameter_2_Local = "" |
0021 | Else |
0022 | str_Parameter_2_Local = str_Parameter_2 |
0023 | End If |
0024 | Select Case strOption |
0025 | Case "1" |
0026 | strQuery = "Dud_Cross_References_This_Year" |
0027 | Case "2" |
0028 | strQuery = "Cross_Reference_MaxID" |
0029 | Case "3" |
0030 | strQuery = "SELECT Count(Cross_Reference_Changes.ID) AS CountOfID FROM Cross_Reference_Changes;" |
0031 | Case "4" |
0032 | strQuery = "SELECT Website_Regen_Control.Regen_Mins, Website_Regen_Control.Last_Run, Website_Regen_Control.Division FROM Website_Regen_Control WHERE (((Website_Regen_Control.Division)=""Paper_Abstract_Ranges""));" |
0033 | Case "5" |
0034 | strQuery = "SELECT Website_Regen_Control.Regen_Mins, Website_Regen_Control.Last_Run, Website_Regen_Control.Division FROM Website_Regen_Control WHERE (((Website_Regen_Control.Division)=""Author_Letters""));" |
0035 | Case "6" |
0036 | strQuery = "SELECT Website_Regen_Control.Regen_Mins, Website_Regen_Control.Last_Run, Website_Regen_Control.Division FROM Website_Regen_Control WHERE (((Website_Regen_Control.Division)=""BookPaperAbstract_Ranges""));" |
0037 | Case "7" |
0038 | strQuery = "SELECT Website_Regen_Control.Regen_Mins, Website_Regen_Control.Last_Run, Website_Regen_Control.Division FROM Website_Regen_Control WHERE (((Website_Regen_Control.Division)=""Note_Regen_Ranges""));" |
0039 | Case "8" |
0040 | strQuery = "SELECT Website_Regen_Control.Regen_Mins, Website_Regen_Control.Last_Run, Website_Regen_Control.Division FROM Website_Regen_Control WHERE (((Website_Regen_Control.Division)=""Note_Archive_Regen_Ranges""));" |
0041 | Case "9" |
0042 | strQuery = "SELECT * FROM Oboe_Latest_Lesson;" |
0043 | Case "10" |
0044 | strQuery = "SELECT BookPaperControl.Time_To_Regenerate, BookPaperControl.Latest_Update FROM BookPaperControl WHERE (((BookPaperControl.[ID])=""Auto_Reference_Notes_Regen""));" |
0045 | Case "11" |
0046 | strQuery = "Hits_Pages_Totals" |
0047 | Case "12" |
0048 | strQuery = "Hits_Pages_Totals_LastYear" |
0049 | Case "13" |
0050 | strQuery = "SELECT Count(Site_Map.Size) AS Records, Max([Timestamp_Logged]) AS [As At] FROM Site_Map;" |
0051 | Case "14" |
0052 | strQuery = "SELECT Website_Regen_Control.Regen_Mins, Website_Regen_Control.Last_Run, Website_Regen_Control.Division FROM Website_Regen_Control WHERE (((Website_Regen_Control.Division)=""Book_Summary_Ranges""));" |
0053 | Case "15" |
0054 | Select Case str_Parameter_2_Local |
0055 | Case "1" |
0056 | strQuery = "Earliest_Lang_Dates" |
0057 | Case "2" |
0058 | strQuery = "Ling_Progress" |
0059 | End Select |
0060 | Case "16", "18" |
0061 | If str_Parameter_2_Local = "" Then |
0062 | Note_Parameter = Note_ID |
0063 | Else |
0064 | Note_Parameter = str_Parameter_2_Local |
0065 | End If |
0066 | strQuery = "SELECT Thesis_Note_XRef.Thesis_Chapter_Note_ID, Thesis_Note_XRef.PID_Note_Seq, Thesis_Note_XRef.PID_Note_Category_1, Thesis_Note_XRef.PID_Note_Category_2, Thesis_Note_XRef.PID_Note_Category_3, Thesis_Note_XRef.PID_Note_Level, Notes.Item_Title, Thesis_Note_XRef.PID_Note_ID, Thesis_Note_XRef.PID_Note_Caption, Thesis_Note_XRef.PID_Footnote, Thesis_Note_XRef.[Exclude?], Thesis_Note_XRef.Reason_Excluded FROM Thesis_Note_XRef INNER JOIN Notes ON Thesis_Note_XRef.PID_Note_ID = Notes.ID WHERE (((Thesis_Note_XRef.Thesis_Chapter_Note_ID) = " & Note_Parameter & ")) ORDER BY Thesis_Note_XRef.PID_Note_Seq, Thesis_Note_XRef.PID_Note_Category_1, Thesis_Note_XRef.PID_Note_Category_2, Thesis_Note_XRef.PID_Note_Category_3, Thesis_Note_XRef.PID_Note_Level, Notes.Item_Title;" |
0067 | Case "17", "19" |
0068 | If str_Parameter_2_Local = "Read" Then |
0069 | strPara2 = "((Functor_Usage.Functor_Option)=6 Or (Functor_Usage.Functor_Option)=8) " |
0070 | Else |
0071 | strPara2 = "((Functor_Usage.Functor_Option)=7 Or (Functor_Usage.Functor_Option)=9) " |
0072 | End If |
0073 | strQuery = "SELECT Thesis_Note_XRef.Thesis_Chapter_Note_ID, Thesis_Note_XRef.PID_Note_Seq, Thesis_Note_XRef.PID_Note_Category_1, Thesis_Note_XRef.PID_Note_Category_2, Thesis_Note_XRef.PID_Note_Category_3, Thesis_Note_XRef.PID_Note_Level, Notes.Item_Title, Thesis_Note_XRef.PID_Note_ID, Thesis_Note_XRef.PID_Note_Caption, Functor_Usage.Functor_Option, Functor_Usage.Functor_Parameter FROM (Thesis_Note_XRef INNER JOIN Functor_Usage ON Thesis_Note_XRef.PID_Note_ID = Functor_Usage.Note_ID) INNER JOIN Notes ON Thesis_Note_XRef.PID_Note_ID = Notes.ID WHERE (" & strPara2 & " And ((Thesis_Note_XRef.Thesis_Chapter_Note_ID) = " & Note_ID & ") And ((Functor_Usage.Functor_ID) = 22) And ((Thesis_Note_XRef.[Exclude?]) = No)) ORDER BY Thesis_Note_XRef.PID_Note_Seq, Thesis_Note_XRef.PID_Note_Category_1, Thesis_Note_XRef.PID_Note_Category_2, Thesis_Note_XRef.PID_Note_Category_3, Thesis_Note_XRef.PID_Note_Level, Thesis_Note_XRef.PID_Note_Caption;" |
0074 | Case "20" |
0075 | strQuery = "Thesis_Progress_Dashboard_List" |
0076 | Case "21" |
0077 | Select Case str_Parameter_2_Local |
0078 | Case "1" |
0079 | strQuery = "PID_Notes_Unused_By_Thesis_Count" |
0080 | Case "2" |
0081 | strQuery = "PID_Notes_Unused_By_Thesis_Note_Lists_Count" |
0082 | Case "3" |
0083 | strQuery = "IdentityBooks_Unreferenced_Count" |
0084 | Case "4" |
0085 | strQuery = "IdentityPapersRead_Unreferenced_Count" |
0086 | Case "5" |
0087 | strQuery = "Works_Missing_By_Thesis_Chapter_Count" |
0088 | Case "6" |
0089 | strQuery = "PID_Papers_Filed_Not_Referenced_Count" |
0090 | Case "7" |
0091 | strQuery = "PID_Papers_Referenced_Undated_Count" |
0092 | Case "8" |
0093 | strQuery = "PID_Papers_Referenced_No_Abstract_Count" |
0094 | Case "9" |
0095 | strQuery = "Large_Page_List_Count" |
0096 | Case "10" |
0097 | strQuery = "PDF_Missing_List_Count" |
0098 | Case "11" |
0099 | strQuery = "Duplicate_Papers_Count" |
0100 | Case "12" |
0101 | strQuery = "PDF_File_List_Count" |
0102 | Case "13" |
0103 | strQuery = "Missing_Webref_DisplayText_List_Count" |
0104 | Case "14" |
0105 | strQuery = "PID_Missing_Online_Papers_List_Count" |
0106 | Case "15" |
0107 | strQuery = "Missing_Webref_DisplayText_List_Books_Count" |
0108 | Case "16" |
0109 | strQuery = "Papers_Inconsistently_Electronic_Count" |
0110 | Case "17" |
0111 | strQuery = "Thesis_Reading_List_Count" |
0112 | Case "18" |
0113 | strQuery = "Thesis_Reading_List_Cited_Count" |
0114 | End Select |
0115 | Case "22" |
0116 | strQuery = "SELECT PID_Missing_Online_Papers_List.[PID Note], Sum(1) AS Total, Sum(IIf([Accept?]=""Yes"",1,0)) AS Accepted, Sum(IIf([Pending?]=""Yes"",1,0)) AS Pending, Sum(IIf([Reserve?]=""Yes"",1,0)) AS Reserve FROM PID_Missing_Online_Papers_List WHERE (((PID_Missing_Online_Papers_List.[PID Note]) Like ""*+" & Note_ID & "+*"")) GROUP BY PID_Missing_Online_Papers_List.[PID Note];" |
0117 | Case "23" |
0118 | Select Case str_Parameter_2_Local |
0119 | Case "1" |
0120 | strQuery = "PID_Pages_Total" |
0121 | Case "2" |
0122 | strQuery = "Paper_Pages_Total" |
0123 | End Select |
0124 | Case "24" |
0125 | strQuery = "Aeon_Papers_Task_List_Count" |
0126 | Case "25" |
0127 | strQuery = "qryDailyTasksTotal" |
0128 | Case Else |
0129 | Debug.Print Now(); "- Note: " & Note_ID & ". Functor_23 : Invalid Option : " & strOption |
0130 | Functor_23 = "No" |
0131 | Exit Function |
0132 | End Select |
0133 | If strOption <> "20" Then |
0134 | Set rs = CurrentDb.OpenRecordset(strQuery) |
0135 | strValue_Local = "" |
0136 | If rs.EOF Then |
0137 | Debug.Print Now(); "- Note: " & Note_ID & ". Functor_23 : No item to print (Option = " & strOption & ")" |
0138 | Functor_23 = "No" |
0139 | Exit Function |
0140 | End If |
0141 | End If |
0142 | Select Case strOption |
0143 | Case "1" |
0144 | rs.MoveLast |
0145 | strElement = rs.Fields(1) |
0146 | If rs.Fields(0) <> rs.Fields(2) Then |
0147 | strElement = 0 |
0148 | End If |
0149 | If strElement = 0 Then |
0150 | strElement = "no" |
0151 | strMsg = "encouraging." |
0152 | Else |
0153 | strMsg = "worrying. Investigate!" |
0154 | Debug.Print Now(); "Note: " & Note_ID & ". Functor_23, Option 1 : Non-zero value printed - Investigate!" |
0155 | End If |
0156 | strValue_Local = strElement & " record" & IIf(Val(strElement) > 1, "s", "") & " for " & rs.Fields(2) & " prior to the " & rs.Fields(3) & " regeneration, which is " & strMsg |
0157 | Case "2" |
0158 | rs.MoveFirst |
0159 | strElement = rs.Fields(0) |
0160 | OK = Number_Format(strElement) |
0161 | strValue_Local = Now() & " it is " & strElement & " - but it's taken " & Year(Now) - 2015 |
0162 | Case "3" |
0163 | rs.MoveFirst |
0164 | strElement = rs.Fields(0) |
0165 | OK = Number_Format(strElement) |
0166 | strValue_Local = strElement & " rows, as of " & Left(Now(), 10) & ", " |
0167 | Case "4", "5", "6", "7", "8", "10", "14" |
0168 | rs.MoveFirst |
0169 | strElement = rs.Fields(0) |
0170 | If strElement >= 60 Then |
0171 | strElement = Round(strElement / 60, 2) & " hours" |
0172 | Else |
0173 | strElement = strElement & " minutes" |
0174 | End If |
0175 | strElement = strElement & " on " & Left(rs.Fields(1), 10) |
0176 | strValue_Local = strElement |
0177 | Case "9", "24" |
0178 | rs.MoveFirst |
0179 | strValue_Local = rs.Fields(0) & "" |
0180 | Case "11", "12" |
0181 | rs.MoveFirst |
0182 | Field_1 = Nz(rs.Fields(0), 0) 'Min period recorded |
0183 | Field_2 = Nz(rs.Fields(1), 0) 'Max period recorded |
0184 | Field_3 = Nz(rs.Fields(2), 0) 'Total Hits |
0185 | Field_1 = Left(Field_1, 4) * 12 + Right(Field_1, 2) |
0186 | Field_2 = Left(Field_2, 4) * 12 + Right(Field_2, 2) |
0187 | Field_1 = Field_2 - Field_1 + 1 |
0188 | Field_2 = Field_1 * 365 / 12 |
0189 | Field_3 = Round(Field_3 / Field_2 / 1000, 1) |
0190 | strValue_Local = Field_3 & "k or so hits a day over the " & Field_1 & " months up to " & rs.Fields(1) |
0191 | Case "13" |
0192 | rs.MoveFirst |
0193 | strValue_Local = Round(rs.Fields(0) / 1000, 0) & "k pages on my site as at " & Left(rs.Fields(1), 10) |
0194 | Case "15" |
0195 | rs.MoveFirst |
0196 | Select Case str_Parameter_2_Local |
0197 | Case "1" |
0198 | strValue_Local = "The next languages in the queue are:- |..|" |
0199 | Field_3 = "" |
0200 | Case "2" |
0201 | strValue_Local = "Progress on Ling (in progress order):- |..|" |
0202 | Field_2 = "" |
0203 | End Select |
0204 | Do Until rs.EOF |
0205 | Select Case str_Parameter_2_Local |
0206 | Case "1" |
0207 | Field_1 = rs.Fields(0) & rs.Fields(1) |
0208 | Field_2 = rs.Fields(2) |
0209 | If Field_2 = "0" Then |
0210 | Field_2 = "Not yet studied" |
0211 | Else |
0212 | Field_2 = "Last studied on " & Format(Field_2, "Long Date") |
0213 | If rs.Fields(4) & "" > "0" Then |
0214 | Field_2 = Field_2 & "; Last Ling Lesson = " & rs.Fields(4) |
0215 | End If |
0216 | If rs.Fields(5) & "" <> "" Then |
0217 | Field_2 = Field_2 & "; Last Ling Revision = " & rs.Fields(5) |
0218 | End If |
0219 | End If |
0220 | If Field_3 <> Field_1 Then |
0221 | If Field_3 <> "" Then |
0222 | strValue_Local = strValue_Local & "|99|" |
0223 | End If |
0224 | strValue_Local = strValue_Local & "|.|" & rs.Fields(0) & ": Priority " & rs.Fields(1) & ": |99|" |
0225 | End If |
0226 | strValue_Local = strValue_Local & "|1|" & Replace(rs.Fields(3), " (Modern)", "") & ". " & Field_2 |
0227 | Field_3 = Field_1 |
0228 | Case "2" |
0229 | Field_1 = rs.Fields(0) |
0230 | If Field_2 <> Field_1 Then |
0231 | If Field_2 <> "" Then |
0232 | strValue_Local = strValue_Local & "|99|" |
0233 | End If |
0234 | strValue_Local = strValue_Local & "|.|Priority " & Field_1 & ":- |99|" |
0235 | End If |
0236 | strValue_Local = strValue_Local & "|1|" & rs.Fields(2) & ": " & rs.Fields(1) & IIf(rs.Fields(3) & "" <> "", " (Revision: " & rs.Fields(3) & ")", "") |
0237 | Field_2 = Field_1 |
0238 | End Select |
0239 | rs.MoveNext |
0240 | Loop |
0241 | strValue_Local = strValue_Local & "|99||..|" |
0242 | Case "16" |
0243 | OK = Functor_Indented_List(rs, strValue_Local) |
0244 | Case "17" |
0245 | OK = Update_Thesis_Chapter_RLs(Note_ID) |
0246 | OK = Functor_Indented_List(rs, strValue_Local, True) |
0247 | Case "18" 'Test only |
0248 | OK = Functor_Indented_List_Development(rs, strValue_Local) |
0249 | Case "19" |
0250 | OK = Update_Thesis_Chapter_RLs(Note_ID) |
0251 | OK = Functor_Indented_List_Development(rs, strValue_Local, True) |
0252 | Case "20" |
0253 | OK = Thesis_Dashboard_Table_Gen(strValue_Local, strQuery) |
0254 | Case "21" |
0255 | rs.MoveFirst |
0256 | strElement = rs.Fields(0) |
0257 | If str_Parameter_2_Local = "6" Then |
0258 | Field_1 = Nz(rs.Fields(1)) |
0259 | End If |
0260 | OK = Number_Format(strElement) |
0261 | strValue_Local = "(" & strElement & " item" & IIf(strElement = 1, "", "s") & IIf(str_Parameter_2_Local = "6", ", " & Field_1 & " unactioned", "") & ")" |
0262 | If str_Parameter_2_Local = "17" Or str_Parameter_2_Local = "18" Then |
0263 | strValue_Local = Replace(strValue_Local, "(", "") |
0264 | strValue_Local = Replace(strValue_Local, ")", "") |
0265 | End If |
0266 | Case "22" |
0267 | If rs.EOF Then |
0268 | strValue_Local = "" |
0269 | Else |
0270 | strValue_Local = "|.|" |
0271 | Field_1 = rs.Fields(0) |
0272 | Field_1 = Mid(Field_1, 2, InStr(Field_1, "]") - 2) |
0273 | Field_1 = Replace(Field_1, " ", "") |
0274 | 'Field_1 = "PDFs_" & Field_1 |
0275 | Field_1 = Left("PDFs_" & Field_1, 20) |
0276 | Field_1 = "For further papers held on-line of potential interest, follow this Link++1317#" & Field_1 & "++." |
0277 | i = rs.Fields.Count |
0278 | Field_1 = Field_1 & " Total papers = " & rs.Fields(1) |
0279 | If i > 2 Then |
0280 | Field_1 = Field_1 |
0281 | Field_3 = ". Including " |
0282 | j = 2 |
0283 | Field_2 = "" |
0284 | Do Until j > i - 1 |
0285 | If rs.Fields(j) > 0 Then |
0286 | Field_1 = Field_1 & Field_3 & Field_2 & rs.Fields(j).Name & " = " & rs.Fields(j) |
0287 | Field_2 = ", " |
0288 | Field_3 = "" |
0289 | End If |
0290 | j = j + 1 |
0291 | Loop |
0292 | Field_1 = Field_1 & "." |
0293 | End If |
0294 | strValue_Local = strValue_Local & Field_1 |
0295 | End If |
0296 | Case "23" |
0297 | rs.MoveFirst |
0298 | strElement = rs.Fields(0) |
0299 | strElement = Round(strElement / 1000, 0) |
0300 | OK = Number_Format(strElement) |
0301 | strValue_Local = strElement & "k pages, as at " & Now() |
0302 | Case "25" |
0303 | rs.MoveFirst |
0304 | strValue_Local = Round(rs.Fields(0) / 60, 2) & " hours" |
0305 | End Select |
0306 | Functor_23 = "Yes" |
0307 | strValue = Trim(strValue_Local) |
0308 | Set rs = Nothing |
0309 | End Function |
Procedures Calling This Procedure (Functor_23)
Procedures Called By This Procedure (Functor_23)
Tables / Queries / Fragments Directly Used By This Procedure (Functor_23)
- Aeon_Papers_Task_List_Count (Query, used in Line 125)
- BookPaperAbstract_Ranges (Table, used in Line 36)
- BookPaperControl (Table, used in Line 44)
- Cross_Reference_Changes (Table, used in Line 30)
- Cross_Reference_MaxID (Query, used in Line 28)
- Dud_Cross_References_This_Year (Query, used in Line 26)
- Duplicate_Papers_Count (Query, used in Line 99)
- Earliest_Lang_Dates (Query, used in Line 56)
- Functor_Usage (Table, used in Lines 69, 71)
- Hits_Pages_Totals (Query, used in Line 46)
- Hits_Pages_Totals_LastYear (Query, used in Line 48)
- IdentityBooks_Unreferenced_Count (Query, used in Line 83)
- IdentityPapersRead_Unreferenced_Count (Query, used in Line 85)
- Large_Page_List_Count (Query, used in Line 95)
- Ling_Progress (Query, used in Line 58)
- Missing_Webref_DisplayText_List_Books_Count (Query, used in Line 107)
- Missing_Webref_DisplayText_List_Count (Query, used in Line 103)
- Note_Archive_Regen_Ranges (Table, used in Line 40)
- Oboe_Latest_Lesson (Table, used in Line 42)
- Paper_Abstract_Ranges (Table, used in Line 32)
- Paper_Pages_Total (Query, used in Line 122)
- Papers (Table, used in Lines 276, 278)
- Papers_Inconsistently_Electronic_Count (Query, used in Line 109)
- PDF_File_List_Count (Query, used in Line 101)
- PDF_Missing_List_Count (Query, used in Line 97)
- PID_Missing_Online_Papers_List (Query, used in Line 116)
- PID_Missing_Online_Papers_List_Count (Query, used in Line 105)
- PID_Notes_Unused_By_Thesis_Count (Query, used in Line 79)
- PID_Notes_Unused_By_Thesis_Note_Lists_Count (Query, used in Line 81)
- PID_Pages_Total (Query, used in Line 120)
- PID_Papers_Filed_Not_Referenced_Count (Query, used in Line 89)
- PID_Papers_Referenced_No_Abstract_Count (Query, used in Line 93)
- PID_Papers_Referenced_Undated_Count (Query, used in Line 91)
- qryDailyTasksTotal (Query, used in Line 127)
- Site_Map (Table, used in Line 50)
- Thesis_Note_XRef (Table, used in Lines 66, 73)
- Thesis_Progress_Dashboard_List (Query, used in Line 75)
- Thesis_Reading_List_Cited_Count (Query, used in Line 113)
- Thesis_Reading_List_Count (Query, used in Line 111)
- Website_Regen_Control (Table, used in Lines 34, 38, 52)
- Works_Missing_By_Thesis_Chapter_Count (Query, used in Line 87)
Go To Start of This Procedure
Go To Top of This Page
Link to VBA Code Control Page
Source Code of: Jacks_Non_Prime Procedure Type: Public Sub Module: Testing Lines of Code: 36
Go To End of This Procedure
Line-No. / Ref. | Code Line |
0001 | Public Sub Jacks_Non_Prime() |
0002 | 'Prove that 2^10 + 5^12 is non-prime |
0003 | 'The program shows:- |
0004 | '... The number is 244,141,649 = 14657 x 16657 |
0005 | '... Max Long is 2,147,483,647, so didn't need LongLong |
0006 | Dim Non_Prime As LongLong |
0007 | Dim Non_Prime_Temp As LongLong |
0008 | Dim Non_Prime_Sqrt As Integer |
0009 | Dim i As Integer |
0010 | Non_Prime_Temp = 1 |
0011 | For i = 1 To 10 |
0012 | Non_Prime_Temp = Non_Prime_Temp * 2 |
0013 | Next i |
0014 | Debug.Print Non_Prime_Temp |
0015 | Non_Prime = Non_Prime_Temp |
0016 | Non_Prime_Temp = 1 |
0017 | For i = 1 To 12 |
0018 | Non_Prime_Temp = Non_Prime_Temp * 5 |
0019 | Next i |
0020 | Debug.Print Non_Prime_Temp |
0021 | Non_Prime = Non_Prime + Non_Prime_Temp |
0022 | Debug.Print Non_Prime |
0023 | Non_Prime_Sqrt = Non_Prime ^ 0.5 |
0024 | Debug.Print Non_Prime_Sqrt |
0025 | Non_Prime_Sqrt = Non_Prime_Sqrt / 2 + 1 |
0026 | For i = 1 To Non_Prime_Sqrt |
0027 | Non_Prime_Temp = Non_Prime Mod (2 * i + 1) |
0028 | If Non_Prime_Temp = 0 Then |
0029 | Debug.Print 2 * i + 1 |
0030 | Non_Prime_Temp = Non_Prime / (2 * i + 1) |
0031 | Debug.Print Non_Prime_Temp |
0032 | Non_Prime_Temp = Non_Prime_Temp * (2 * i + 1) |
0033 | Debug.Print Non_Prime_Temp |
0034 | End If |
0035 | Next i |
0036 | End Sub |
Go To Start of This Procedure
Go To Top of This Page
Link to VBA Code Control Page
Source Code of: Number_Format Procedure Type: Public Function Module: New Code Lines of Code: 42
Go To End of This Procedure
Line-No. / Ref. | Code Line |
0001 | Public Function Number_Format(strNumber_Sent) |
0002 | Dim strNumber_Local As String |
0003 | Dim Digit_Table(20) As String |
0004 | Dim i As Integer |
0005 | Dim j As Integer |
0006 | Dim iLen_Number As Integer |
0007 | 'This function inserts commas into a number sent ... |
0008 | 'I may get it to do further functions in due course |
0009 | ' .... I couldn't find an HTML format command to do this |
0010 | ' .... but there must be a VBA built-in function? |
0011 | strNumber_Local = Trim(strNumber_Sent) |
0012 | If Not IsNumeric(strNumber_Local) Then |
0013 | Exit Function |
0014 | End If |
0015 | If Val(strNumber_Local) < 1000 Then 'Can't be any commas |
0016 | Exit Function |
0017 | End If |
0018 | iLen_Number = Len(strNumber_Local) |
0019 | For i = 1 To 20 |
0020 | Digit_Table(i) = "" |
0021 | Next i |
0022 | 'Add the commas (in reverse) |
0023 | j = 1 |
0024 | For i = 1 To iLen_Number |
0025 | Digit_Table(j) = Mid(strNumber_Local, iLen_Number + 1 - i, 1) |
0026 | j = j + 1 |
0027 | If i Mod 3 = 0 Then |
0028 | Digit_Table(j) = "," |
0029 | j = j + 1 |
0030 | End If |
0031 | Next i |
0032 | 'Remove trailing comma |
0033 | If Digit_Table(j - 1) = "," Then |
0034 | Digit_Table(j - 1) = "" |
0035 | End If |
0036 | strNumber_Local = "" |
0037 | For i = 1 To j - 1 |
0038 | strNumber_Local = strNumber_Local & Digit_Table(j - i) |
0039 | Next i |
0040 | 'Exit |
0041 | strNumber_Sent = strNumber_Local |
0042 | End Function |
Procedures Calling This Procedure (Number_Format)
Go To Start of This Procedure
Go To Top of This Page
Link to VBA Code Control Page
| | | | | | | | | | | | | |