Skip to content

Commit c864659

Browse files
Update testing database
Performed round-trip export and build of the testing database to verify that some of the newer features are working as intended. (Also verified that we have resolved an issue with VBE forms.)
1 parent 8ad9074 commit c864659

File tree

8 files changed

+111
-114
lines changed

8 files changed

+111
-114
lines changed

Testing/Testing.accdb.src/forms/frmColors.bas

-24
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,6 @@ Begin Form
659659
PressedColor =6249563
660660
HoverForeColor =4210752
661661
PressedForeColor =4210752
662-
WebImagePaddingLeft =2
663-
WebImagePaddingTop =2
664-
WebImagePaddingRight =1
665-
WebImagePaddingBottom =1
666662
End
667663
Begin CommandButton
668664
OverlapFlags =85
@@ -688,10 +684,6 @@ Begin Form
688684
PressedColor =6249563
689685
HoverForeColor =4210752
690686
PressedForeColor =4210752
691-
WebImagePaddingLeft =2
692-
WebImagePaddingTop =2
693-
WebImagePaddingRight =1
694-
WebImagePaddingBottom =1
695687
End
696688
Begin CommandButton
697689
OverlapFlags =85
@@ -719,10 +711,6 @@ Begin Form
719711
PressedColor =6249563
720712
HoverForeColor =4210752
721713
PressedForeColor =4210752
722-
WebImagePaddingLeft =2
723-
WebImagePaddingTop =2
724-
WebImagePaddingRight =1
725-
WebImagePaddingBottom =1
726714
End
727715
Begin CommandButton
728716
OverlapFlags =85
@@ -750,10 +738,6 @@ Begin Form
750738
PressedColor =6249563
751739
HoverForeColor =4210752
752740
PressedForeColor =4210752
753-
WebImagePaddingLeft =2
754-
WebImagePaddingTop =2
755-
WebImagePaddingRight =1
756-
WebImagePaddingBottom =1
757741
End
758742
Begin CommandButton
759743
OverlapFlags =85
@@ -778,10 +762,6 @@ Begin Form
778762
PressedColor =6249563
779763
HoverForeColor =4210752
780764
PressedForeColor =4210752
781-
WebImagePaddingLeft =2
782-
WebImagePaddingTop =2
783-
WebImagePaddingRight =1
784-
WebImagePaddingBottom =1
785765
End
786766
Begin CommandButton
787767
OverlapFlags =85
@@ -809,10 +789,6 @@ Begin Form
809789
PressedColor =6249563
810790
HoverForeColor =4210752
811791
PressedForeColor =4210752
812-
WebImagePaddingLeft =2
813-
WebImagePaddingTop =2
814-
WebImagePaddingRight =1
815-
WebImagePaddingBottom =1
816792
End
817793
Begin Rectangle
818794
BackStyle =1

Testing/Testing.accdb.src/forms/frmMain.bas

+48-56
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,6 @@ Begin Form
191191
PressedColor =9262658
192192
HoverForeColor =4210752
193193
PressedForeColor =4210752
194-
WebImagePaddingLeft =2
195-
WebImagePaddingTop =2
196-
WebImagePaddingRight =1
197-
WebImagePaddingBottom =1
198194
Overlaps =1
199195
End
200196
Begin ListBox
@@ -327,10 +323,6 @@ Begin Form
327323
PressedColor =9262658
328324
HoverForeColor =4210752
329325
PressedForeColor =4210752
330-
WebImagePaddingLeft =2
331-
WebImagePaddingTop =2
332-
WebImagePaddingRight =1
333-
WebImagePaddingBottom =1
334326
Overlaps =1
335327
End
336328
Begin Label
@@ -398,146 +390,146 @@ Public Sub cmdRunTests_Click()
398390
Dim intTest As Integer
399391
Dim dbs As DAO.Database
400392
Dim rsc As SharedResource
401-
393+
402394
Set dbs = CurrentDb
403-
395+
404396
' Clear list and totals
405397
lstResults.RowSource = ""
406398
m_Totals(True) = 0
407399
m_Totals(False) = 0
408-
400+
409401
' Ignore any errors.
410402
' NOTE: don't include the test result on a line that may throw an error.
411403
On Error Resume Next
412-
404+
413405
' Update linked tables/CSV to use the current directory
414406
dbs.TableDefs("tblLinkedAccess").Connect = ";DATABASE=" & Application.CurrentProject.Path & "\Testing.accdb"
415407
dbs.TableDefs("tblLinkedAccess").RefreshLink
416408
dbs.TableDefs("tblLinkedCSV").Connect = "Text;DSN=Linked Link Specification;FMT=Delimited;HDR=NO;IMEX=2;CharacterSet=437;ACCDB=YES;DATABASE=" & Application.CurrentProject.Path
417409
dbs.TableDefs("tblLinkedCSV").RefreshLink
418-
410+
419411
'========================
420412
' BEGIN TESTS
421413
'========================
422-
414+
423415
' Tables
424416
strTest = dbs.TableDefs("tblInternal").Name
425417
ShowResult "Access Table exists", (strTest = "tblInternal")
426-
418+
427419
intTest = 0
428420
intTest = DCount("*", "tblInternal")
429421
ShowResult "tblInternal has data", (intTest > 0)
430-
422+
431423
strTest = dbs.TableDefs("tblLinkedCSV").Name
432424
ShowResult "Linked Table exists", (strTest = "tblLinkedCSV")
433425

434426
intTest = 0
435427
intTest = DCount("*", "tblLinkedCSV")
436428
ShowResult "tblLinkedCSV has data", (intTest > 0)
437-
429+
438430
ShowResult "Saved Table Data (TDF)", FSO.FileExists(ExportFolder & "tables\tblInternal.txt")
439-
431+
440432
ShowResult "Saved Table Data (XML)", FSO.FileExists(ExportFolder & "tables\tblSaveXML.xml")
441-
433+
442434
ShowResult "Table SQL", FSO.FileExists(ExportFolder & "tbldefs\tblInternal.sql")
443435

444436
ShowResult "Linked Table JSON", FSO.FileExists(ExportFolder & "tbldefs\tblLinkedCSV.json")
445-
437+
446438
ShowResult "Linked Table structure", FSO.FileExists(ExportFolder & "tbldefs\tblLinkedCSV.sql")
447439

448440
intTest = 0
449441
intTest = dbs.Relations("tblInternaltblSaveXML").Fields.Count
450442
ShowResult "Table Relationship", (intTest = 1)
451-
443+
452444
intTest = 0
453445
intTest = DCount("*", "MSysObjects", "Not IsNull(LvExtra) and Type = 1 and [Name] = 'tblSaveXML'")
454446
ShowResult "Table Data Macro Exists", (intTest > 0)
455-
456-
447+
448+
457449
' Queries
458450
strTest = dbs.QueryDefs("qryNavigationPaneGroups").Name
459451
ShowResult "Query exists", (strTest = "qryNavigationPaneGroups")
460-
461-
452+
453+
462454
' Forms
463455
strTest = CurrentProject.AllForms("frmMain").Name
464456
ShowResult "Form exists", (strTest = "frmMain")
465-
466-
457+
458+
467459
' Reports
468460
strTest = CurrentProject.AllReports("rptNavigationPaneGroups").Name
469461
ShowResult "Report exists", (strTest = "rptNavigationPaneGroups")
470462
ShowResult "Landscape Orientation", (Report_rptNonDefaultPaperSize.Printer.Orientation = acPRORLandscape)
471463
ShowResult "A4 Paper Size", (Report_rptNonDefaultPaperSize.Printer.PaperSize = acPRPSA4)
472-
473-
464+
465+
474466
' Macros
475467
strTest = CurrentProject.AllMacros("AutoExec").Name
476468
ShowResult "Macro exists", (strTest = "AutoExec")
477-
478-
469+
470+
479471
' Modules
480472
strTest = CurrentProject.AllModules("basUtility").Name
481473
ShowResult "Standard Module exists", (strTest = "basUtility")
482474
strTest = GetVBProjectForCurrentDB.VBComponents("basExtendedChars").CodeModule.Lines(6, 1)
483475
ShowResult "Extended ASCII text in VBA", (Mid$(strTest, 10, 1) = Chr(151))
484-
476+
485477
strTest = CurrentProject.AllModules("clsPerson").Name
486478
ShowResult "Class Module exists", (strTest = "clsPerson")
487-
488-
479+
480+
489481
' Database properties
490482
strTest = ""
491483
strTest = dbs.Properties("AppIcon")
492484
ShowResult "Application Icon is set", (Len(strTest) > 5)
493485

494486
strTest = dbs.Properties("DAOProperty").Value
495487
ShowResult "Custom Database (DAO) property", (strTest = "DAO")
496-
488+
497489
strTest = CurrentProject.Properties("ProjectProperty").Value
498490
ShowResult "Custom Project Property", (strTest = "TestValue")
499-
491+
500492
strTest = dbs.Containers("Databases").Documents("SummaryInfo").Properties("Title")
501493
ShowResult "Database Summary Property (Title)", (strTest = "VCS Testing")
502-
494+
503495
strTest = dbs.Containers("Tables").Documents("tblSaveXML").Properties("Description")
504496
ShowResult "Navigation pane object description", (strTest = "Saved description in XML table.")
505-
497+
506498
strTest = dbs.Containers("Modules").Documents("basUtility").Properties("Description")
507499
ShowResult "Module description", (strTest = "My special description on the code module.")
508-
500+
509501
ShowResult "Saved shared images", (CurrentProject.Resources.Count > 2)
510-
502+
511503
ShowResult "Saved import/export specs (XML)", (CurrentProject.ImportExportSpecifications.Count > 0)
512-
504+
513505
strTest = CurrentProject.ImportExportSpecifications(0).Name
514506
ShowResult "Name of saved specification", (strTest = "Export-MSysIMEXColumns")
515-
507+
516508
strTest = Nz(DLookup("SpecName", "MSysIMEXSpecs", "SpecName=""Test 2"""))
517509
ShowResult "Saved IMEX spec (Table based)", (strTest = "Test 2")
518-
510+
519511
strTest = Nz(DLookup("Name", "MSysNavPaneGroups", "Name=""My Modules"""))
520512
ShowResult "Custom navigation pane group", (strTest = "My Modules")
521-
513+
522514
' VBE Project
523515
With GetVBProjectForCurrentDB
524-
516+
525517
ShowResult "VBE project name", (.Name = "VCS Testing")
526518
ShowResult "VBE project description", (.Description = "For automated testing of Version Control")
527519
ShowResult "Help context id", (.HelpContextId = 123456)
528-
520+
529521
strTest = .References("Scripting").Name
530522
ShowResult "GUID reference (scripting)", (strTest = "Scripting")
531-
523+
532524
strTest = .References("MSForms").Name
533525
ShowResult "MS Forms 2.0 reference", (strTest = "MSForms")
534-
526+
535527
End With
536-
528+
537529
' Theme
538530
strTest = CurrentDb.Properties("Theme Resource Name")
539531
ShowResult "Active theme = Angles", (strTest = "Angles")
540-
532+
541533
strTest = vbNullString
542534
For Each rsc In CurrentProject.Resources
543535
If rsc.Type = acResourceTheme Then
@@ -546,26 +538,26 @@ Public Sub cmdRunTests_Click()
546538
End If
547539
Next rsc
548540
ShowResult "Theme resource exists", (strTest = "Angles")
549-
541+
550542
' Other
551543
ShowResult "VCS Options file exists", FSO.FileExists(ExportFolder & "vcs-options.json")
552-
553-
544+
545+
554546
'========================
555547
' END TESTS
556548
'========================
557-
549+
558550
' Display results
559551
lblResults.Caption = _
560552
m_Totals(True) & " tests passed" & vbCrLf & _
561553
m_Totals(False) & " tests failed"
562-
554+
563555
If m_Totals(False) = 0 Then
564556
imgResult.Picture = "button_ok"
565557
Else
566558
imgResult.Picture = "button_error"
567559
End If
568-
560+
569561
If Err Then Err.Clear
570562

571563
End Sub

0 commit comments

Comments
 (0)