diff --git a/big_rivers.zip b/big_rivers.zip deleted file mode 100644 index ab794c3..0000000 Binary files a/big_rivers.zip and /dev/null differ diff --git a/source/forms/Contact.bas b/source/forms/Contact.bas index 227f2c3..a78023c 100644 --- a/source/forms/Contact.bas +++ b/source/forms/Contact.bas @@ -20,10 +20,10 @@ Begin Form Width =8220 DatasheetFontHeight =11 ItemSuffix =61 - Left =2955 - Top =2730 - Right =16110 - Bottom =14115 + Left =9150 + Top =3510 + Right =18090 + Bottom =14895 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x20f1f0c46fcee440 @@ -1520,10 +1520,10 @@ End Sub Private Sub Form_BeforeUpdate(Cancel As Integer) On Error GoTo Err_Handler - Debug.Print Me.Name & " Form_BeforeUpdate SaveOK = " & m_SaveOK - - Debug.Print Me.Name & " Form_BeforeUpdate Me.Dirty IS " & Me.Dirty - Debug.Print Me.Name & " Form_BeforeUpdate Me.list.Form.Dirty IS " & Me.list.Form.Dirty +' Debug.Print Me.Name & " Form_BeforeUpdate SaveOK = " & m_SaveOK +' +' Debug.Print Me.Name & " Form_BeforeUpdate Me.Dirty IS " & Me.Dirty +' Debug.Print Me.Name & " Form_BeforeUpdate Me.list.Form.Dirty IS " & Me.list.Form.Dirty 'avoid actions when clearing form If RefSub = "ClearForm" Then GoTo Exit_Handler @@ -1536,8 +1536,8 @@ On Error GoTo Err_Handler 'm_ContinueSave = True End If - Debug.Print Me.Name & " Form_BeforeUpdate after cnx Me.Dirty IS " & Me.Dirty - Debug.Print Me.Name & " Form_BeforeUpdate after cnx Me.list.Form.Dirty IS " & Me.list.Form.Dirty +' Debug.Print Me.Name & " Form_BeforeUpdate after cnx Me.Dirty IS " & Me.Dirty +' Debug.Print Me.Name & " Form_BeforeUpdate after cnx Me.list.Form.Dirty IS " & Me.list.Form.Dirty Exit_Handler: @@ -2067,8 +2067,8 @@ On Error GoTo Err_Handler Dim isOK As Boolean - Debug.Print Me.Name & " Form_Current Me.Dirty IS " & Me.Dirty - Debug.Print Me.Name & " Form_Current Me.list.Form.Dirty IS " & Me.list.Form.Dirty +' Debug.Print Me.Name & " Form_Current Me.Dirty IS " & Me.Dirty +' Debug.Print Me.Name & " Form_Current Me.list.Form.Dirty IS " & Me.list.Form.Dirty 'default isOK = False diff --git a/source/forms/ContactList.bas b/source/forms/ContactList.bas index fb73aa5..4e849bb 100644 --- a/source/forms/ContactList.bas +++ b/source/forms/ContactList.bas @@ -18,13 +18,13 @@ Begin Form DatasheetGridlinesBehavior =3 GridX =24 GridY =24 - Width =7500 + Width =8640 DatasheetFontHeight =11 ItemSuffix =44 - Left =3255 - Top =4050 - Right =10980 - Bottom =8415 + Left =450 + Top =5835 + Right =8175 + Bottom =9945 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x8ae9cc518dd4e440 @@ -211,9 +211,9 @@ Begin Form ForeTint =100.0 End Begin Label - OverlapFlags =215 - Left =180 - Top =120 + OverlapFlags =223 + Left =1380 + Top =240 Width =7260 Height =840 BorderColor =8355711 @@ -222,10 +222,10 @@ Begin Form Caption ="Edit or Delete Records using the buttons for the record at right.\015\012Icon co" "des at left identify if record may be edited/deleted." GridlineColor =10921638 - LayoutCachedLeft =180 - LayoutCachedTop =120 - LayoutCachedWidth =7440 - LayoutCachedHeight =960 + LayoutCachedLeft =1380 + LayoutCachedTop =240 + LayoutCachedWidth =8640 + LayoutCachedHeight =1080 ForeThemeColorIndex =-1 ForeTint =100.0 End @@ -250,7 +250,7 @@ Begin Form ForeTint =100.0 End Begin Label - OverlapFlags =85 + OverlapFlags =215 TextAlign =1 Left =1620 Top =1020 @@ -271,7 +271,7 @@ Begin Form ForeTint =100.0 End Begin Label - OverlapFlags =85 + OverlapFlags =215 TextAlign =1 Left =3180 Top =1020 diff --git a/source/forms/EventsList.bas b/source/forms/EventsList.bas index 518ff68..b2857d4 100644 --- a/source/forms/EventsList.bas +++ b/source/forms/EventsList.bas @@ -20,10 +20,10 @@ Begin Form Width =7560 DatasheetFontHeight =11 ItemSuffix =30 - Left =450 - Top =3450 - Right =7830 - Bottom =7560 + Left =1065 + Top =2820 + Right =8700 + Bottom =7185 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x78280a14fe06e540 @@ -182,6 +182,7 @@ Begin Form ForeColor =16777215 Name ="lblStartDate" Caption ="Start Date" + OnClick ="[Event Procedure]" GridlineColor =10921638 LayoutCachedLeft =4740 LayoutCachedTop =1080 @@ -201,6 +202,7 @@ Begin Form ForeColor =16777215 Name ="lblHdrID" Caption ="ID" + OnClick ="[Event Procedure]" GridlineColor =10921638 LayoutCachedLeft =1020 LayoutCachedTop =1080 @@ -221,6 +223,7 @@ Begin Form ForeColor =16777215 Name ="lblLocation" Caption ="Location" + OnClick ="[Event Procedure]" GridlineColor =10921638 LayoutCachedLeft =3420 LayoutCachedTop =1080 @@ -241,6 +244,7 @@ Begin Form ForeColor =16777215 Name ="lblSite" Caption ="Site" + OnClick ="[Event Procedure]" GridlineColor =10921638 LayoutCachedLeft =1440 LayoutCachedTop =1080 @@ -503,7 +507,7 @@ Option Explicit ' ================================= ' Form: EventsList ' Level: Application form -' Version: 1.03 +' Version: 1.04 ' Basis: Dropdown form ' ' Description: List form object related properties, events, functions & procedures for UI display @@ -514,6 +518,7 @@ Option Explicit ' BLC - 7/26/2016 - 1.01 - add RunReadyForSave() check ' BLC - 1/9/2017 - 1.02 - revised btnDelete_Click() to use tbxID vs ID on delete ' BLC - 10/18/2017 - 1.03 - code cleanup +' BLC - 12/7/2017 - 1.04 - added sorting ' ================================= '--------------------- @@ -714,6 +719,134 @@ Err_Handler: Resume Exit_Handler End Sub +' --------------------------------- +' Sub: lblHdrID_Click +' Description: lbl click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: +' pere_de_chipstic, August 5, 2012 +' http://www.utteraccess.com/forum/Sort-Continuous-Form-Hea-t1991553.html +' Source/date: Bonnie Campbell, September 13, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/7/2016 - initial version +' --------------------------------- +Private Sub lblHdrID_Click() +On Error GoTo Err_Handler + + 'set the sort + SortListForm Me, Me.lblHdrID + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - lblHdrID_Click[EventsList form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: lblSite_Click +' Description: lbl click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: +' pere_de_chipstic, August 5, 2012 +' http://www.utteraccess.com/forum/Sort-Continuous-Form-Hea-t1991553.html +' Source/date: Bonnie Campbell, September 13, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/7/2016 - initial version +' --------------------------------- +Private Sub lblSite_Click() +On Error GoTo Err_Handler + + 'set the sort + SortListForm Me, Me.lblSite + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - lblSite_Click[EventsList form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: lblLocation_Click +' Description: lbl click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: +' pere_de_chipstic, August 5, 2012 +' http://www.utteraccess.com/forum/Sort-Continuous-Form-Hea-t1991553.html +' Source/date: Bonnie Campbell, September 13, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/7/2016 - initial version +' --------------------------------- +Private Sub lblLocation_Click() +On Error GoTo Err_Handler + + 'set the sort + SortListForm Me, Me.lblLocation + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - lblLocation_Click[EventsList form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: lblStartDate_Click +' Description: lbl click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: +' pere_de_chipstic, August 5, 2012 +' http://www.utteraccess.com/forum/Sort-Continuous-Form-Hea-t1991553.html +' Source/date: Bonnie Campbell, September 13, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/7/2016 - initial version +' --------------------------------- +Private Sub lblStartDate_Click() +On Error GoTo Err_Handler + + 'set the sort + SortListForm Me, Me.lblStartDate + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - lblStartDate_Click[EventsList form])" + End Select + Resume Exit_Handler +End Sub + ' --------------------------------- ' Sub: btnEdit_Click ' Description: Enter button click actions diff --git a/source/forms/Photo.bas b/source/forms/Photo.bas index 7f4fad5..18cc689 100644 --- a/source/forms/Photo.bas +++ b/source/forms/Photo.bas @@ -13,11 +13,11 @@ Begin Form GridY =24 Width =11400 DatasheetFontHeight =11 - ItemSuffix =31 - Left =14085 - Top =3510 - Right =26490 - Bottom =14895 + ItemSuffix =32 + Left =3225 + Top =2430 + Right =24735 + Bottom =15015 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x80331edabcc4e440 @@ -210,62 +210,9 @@ Begin Form AlternateBackShade =95.0 Begin Begin Label - Visible = NotDefault - OverlapFlags =93 - Left =6180 - Width =1512 - Height =372 - FontSize =14 - BorderColor =8355711 - ForeColor =16777215 - Name ="lblPark" - Caption ="DINO" - GridlineColor =10921638 - LayoutCachedLeft =6180 - LayoutCachedWidth =7692 - LayoutCachedHeight =372 - ForeThemeColorIndex =-1 - ForeTint =100.0 - End - Begin Label - Visible = NotDefault - OverlapFlags =93 - Left =7980 - Width =1512 - Height =372 - FontSize =14 - BorderColor =8355711 - ForeColor =16777215 - Name ="lblSite" - Caption ="DL" - GridlineColor =10921638 - LayoutCachedLeft =7980 - LayoutCachedWidth =9492 - LayoutCachedHeight =372 - ForeThemeColorIndex =-1 - ForeTint =100.0 - End - Begin Label - Visible = NotDefault OverlapFlags =93 - Left =9780 - Width =1512 - Height =372 - FontSize =14 - BorderColor =8355711 - ForeColor =16777215 - Name ="lblFeature" - GridlineColor =10921638 - LayoutCachedLeft =9780 - LayoutCachedWidth =11292 - LayoutCachedHeight =372 - ForeThemeColorIndex =-1 - ForeTint =100.0 - End - Begin Label - OverlapFlags =223 TextAlign =3 - Left =6240 + Left =5940 Width =5160 Height =375 FontSize =14 @@ -273,10 +220,10 @@ Begin Form BorderColor =8355711 ForeColor =6750105 Name ="lblContext" - Caption ="DINO > Yampa > DL" + Caption ="context" GridlineColor =10921638 - LayoutCachedLeft =6240 - LayoutCachedWidth =11400 + LayoutCachedLeft =5940 + LayoutCachedWidth =11100 LayoutCachedHeight =375 ForeThemeColorIndex =-1 End @@ -362,7 +309,7 @@ Begin Form OverlapFlags =215 Left =60 Top =360 - Width =11280 + Width =8460 Height =480 BorderColor =8355711 ForeColor =16777164 @@ -372,7 +319,7 @@ Begin Form GridlineColor =10921638 LayoutCachedLeft =60 LayoutCachedTop =360 - LayoutCachedWidth =11340 + LayoutCachedWidth =8520 LayoutCachedHeight =840 ForeThemeColorIndex =-1 ForeTint =100.0 @@ -427,6 +374,35 @@ Begin Form WebImagePaddingBottom =1 Overlaps =1 End + Begin CommandButton + OverlapFlags =85 + Left =9840 + Top =420 + TabIndex =2 + ForeColor =16711680 + Name ="btnBatchUpdate" + Caption ="Batch Update" + OnClick ="[Event Procedure]" + ControlTipText ="Batch update photos" + GridlineColor =10921638 + + LayoutCachedLeft =9840 + LayoutCachedTop =420 + LayoutCachedWidth =11280 + LayoutCachedHeight =780 + ForeThemeColorIndex =-1 + BackColor =14136213 + BorderColor =14136213 + HoverColor =65280 + HoverThemeColorIndex =-1 + PressedColor =9592887 + HoverForeColor =4210752 + PressedForeColor =4210752 + WebImagePaddingLeft =2 + WebImagePaddingTop =2 + WebImagePaddingRight =1 + WebImagePaddingBottom =1 + End End End Begin Section @@ -56461,7 +56437,7 @@ Begin Form Begin CommandButton OverlapFlags =85 Left =9900 - Top =120 + Top =60 TabIndex =2 ForeColor =16711680 Name ="btnAddTask" @@ -56471,9 +56447,9 @@ Begin Form GridlineColor =10921638 LayoutCachedLeft =9900 - LayoutCachedTop =120 + LayoutCachedTop =60 LayoutCachedWidth =11340 - LayoutCachedHeight =480 + LayoutCachedHeight =420 ForeThemeColorIndex =-1 BackColor =14136213 BorderColor =14136213 @@ -56495,7 +56471,7 @@ Begin Form BackStyle =0 IMESentenceMode =3 Left =9960 - Top =600 + Top =540 Width =480 Height =317 FontSize =9 @@ -56508,9 +56484,9 @@ Begin Form GridlineColor =10921638 LayoutCachedLeft =9960 - LayoutCachedTop =600 + LayoutCachedTop =540 LayoutCachedWidth =10440 - LayoutCachedHeight =917 + LayoutCachedHeight =857 BackShade =85.0 BorderThemeColorIndex =0 BorderTint =50.0 @@ -56540,7 +56516,7 @@ Option Explicit ' MODULE: Photo form ' Description: Photo form treeview functions & procedures ' Level: Framework form -' Version: 1.13 +' Version: 1.15 ' ' Source/date: Bonnie Campbell, 7/10/2015 ' Revisions: BLC - 7/10/2015 - 1.00 - initial version @@ -56560,6 +56536,8 @@ Option Explicit ' BLC - 2/21/2017 - 1.11 - renamed Photo form from Treeview form ' BLC - 9/25/2017 - 1.12 - revise for NCPN_framework.XX classes ' BLC - 9/27/2017 - 1.13 - update to use Factory.NewClassXX() vs GetClass() +' BLC - 12/11/2017 - 1.14 - revised from Tree to Photo form, added form properties +' BLC - 12/12/2017 - 1.15 - add btnBatchUpdate ' ================================= '--------------------- @@ -56569,14 +56547,96 @@ Option Explicit '--------------------- ' Declarations '--------------------- +Private m_Title As String +Private m_Directions As String +Private m_CallingForm As String + +Private m_SaveOK As Boolean 'ok to save record (prevents bound form from immediately updating) + +Private m_SelectedPhotoType As String + +Public PHOTO_TYPES_MAIN_ABBREV As String 'string of viable abbreviations '--------------------- ' Event Declarations '--------------------- +Public Event InvalidTitle(Value As String) +Public Event InvalidDirections(Value As String) +Public Event InvalidCallingForm(Value As String) +Public Event InvalidSelectedPhotoType(Value As String) '--------------------- ' Properties '--------------------- +Public Property Let Title(Value As String) + If Len(Value) > 0 Then + m_Title = Value + + 'set the form title & caption + Me.lblTitle.Caption = m_Title + Me.Caption = m_Title + Else + RaiseEvent InvalidTitle(Value) + End If +End Property + +Public Property Get Title() As String + Title = m_Title +End Property + +Public Property Let Directions(Value As String) + If Len(Value) > 0 Then + m_Directions = Value + + 'set the form directions + Me.lblDirections.Caption = m_Directions + Else + RaiseEvent InvalidDirections(Value) + End If +End Property + +Public Property Get Directions() As String + Directions = m_Directions +End Property + +Public Property Let CallingForm(Value As String) + m_CallingForm = Value +End Property + +Public Property Get CallingForm() As String + CallingForm = m_CallingForm +End Property + +Public Property Let SelectedPhotoType(Value As String) + Dim PhotoTypes() As String + Dim PhotoTypeAbbrevs() As String + Dim abbrevs As String + Dim i As Integer + + If Len(PHOTO_TYPES_MAIN_ABBREV) > 0 Then + abbrevs = PHOTO_TYPES_MAIN_ABBREV + Else + PhotoTypes = Split(PHOTO_TYPES_MAIN, ",") + abbrevs = "" + + For i = 0 To UBound(PhotoTypes) + abbrevs = abbrevs & "," & Left(PhotoTypes(i), 1) + Next + End If + + PhotoTypeAbbrevs = Split(abbrevs, ",") + + 'set the + PHOTO_TYPES_MAIN_ABBREV = abbrevs + + If IsInArray(Value, PhotoTypeAbbrevs) Then + m_SelectedPhotoType = Value + End If +End Property + +Public Property Get SelectedPhotoType() As String + SelectedPhotoType = m_SelectedPhotoType +End Property '--------------------- ' Methods @@ -56600,6 +56660,7 @@ Option Explicit ' BLC - 7/10/2015 - initial version ' BLC - 6/29/2016 - added park,site,feature header captions ' BLC - 10/25/2016 - renamed btnAddVisit -> btnAddEvent +' BLC - 12/11/2017 - added PHOTO_TYPES_MAIN_ABBREV ' --------------------------------- Private Sub Form_Load() On Error GoTo Err_Handler @@ -56608,17 +56669,25 @@ On Error GoTo Err_Handler Dim PhotoType As Variant Dim nodeCurrent As Node, nodeRoot As Node, SelectedNode As Node - 'minimize Main - ToggleForm "Main", -1 + 'determine viable photo types + + + 'default + Me.CallingForm = "Main" + + If Len(Me.OpenArgs) > 0 Then Me.CallingForm = Me.OpenArgs + + 'minimize calling form + ToggleForm Me.CallingForm, -1 'set context - based on TempVars lblContext.ForeColor = lngLime - lblContext.Caption = GetContext + lblContext.Caption = GetContext() 'set park, site, feature info - lblPark.Caption = Nz(TempVars("ParkCode"), "") - lblSite.Caption = Nz(TempVars("SiteCode"), "") - lblFeature.Caption = Nz(TempVars("Feature"), "") + 'lblPark.Caption = Nz(TempVars("ParkCode"), "") + 'lblSite.Caption = Nz(TempVars("SiteCode"), "") + 'lblFeature.Caption = Nz(TempVars("Feature"), "") 'defaults lblTitle.Caption = "" @@ -56830,6 +56899,36 @@ Err_Handler: Resume Exit_Handler End Sub +' --------------------------------- +' SUB: btnBatchUpdate_Click +' Description: Open batch update form for batch updates of temp photos +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: none +' Source/date: Bonnie Campbell, December 12, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/12/2017 - initial version +' --------------------------------- +Private Sub btnBatchUpdate_Click() +On Error GoTo Err_Handler + + DoCmd.OpenForm "PhotoBatchUpdate", acNormal, , , , , "" + +Exit_Handler: + Exit Sub + +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnBatchUpdate_Click[Photo form])" + End Select + Resume Exit_Handler +End Sub + ' --------------------------------- ' SUB: btnAddEvent_Click ' Description: button click actions @@ -56843,11 +56942,12 @@ End Sub ' Revisions: ' BLC - 10/17/2016 - initial version ' BLC - 10/25/2016 - renamed to btnAddEvent +' BLC - 12/11/2017 - revised from Tree to Photo form ' --------------------------------- Private Sub btnAddEvent_Click() On Error GoTo Err_Handler - DoCmd.OpenForm "Events", acNormal, , , , , "Tree" + DoCmd.OpenForm "Events", acNormal, , , , , "Photo" Exit_Handler: Exit Sub @@ -57677,6 +57777,7 @@ On Error GoTo Err_Handler Case "U" strForm = "PhotoOtherDetails" lblPhotoTypeValue.ForeColor = lngRed + Case Else strForm = "PhotoOtherDetails" End Select diff --git a/source/forms/SetObserverRecorder_old.bas b/source/forms/PhotoBatchUpdate.bas similarity index 58% rename from source/forms/SetObserverRecorder_old.bas rename to source/forms/PhotoBatchUpdate.bas index 989cbd2..da7c4ed 100644 --- a/source/forms/SetObserverRecorder_old.bas +++ b/source/forms/PhotoBatchUpdate.bas @@ -19,17 +19,18 @@ Begin Form GridY =24 Width =7860 DatasheetFontHeight =11 - ItemSuffix =37 - Left =3525 - Top =2490 - Right =16275 - Bottom =13875 + ItemSuffix =45 + Left =3225 + Top =2430 + Right =11085 + Bottom =14670 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x26c502515408e540 End - Caption ="Set Observer/Recorder" + Caption ="Set batch photo data" OnCurrent ="[Event Procedure]" + BeforeUpdate ="[Event Procedure]" OnOpen ="[Event Procedure]" OnClose ="[Event Procedure]" DatasheetFontName ="Calibri" @@ -106,6 +107,24 @@ Begin Form PressedForeThemeColorIndex =0 PressedForeTint =75.0 End + Begin OptionButton + BorderLineStyle =0 + LabelX =230 + LabelY =-30 + BorderThemeColorIndex =1 + BorderShade =65.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + End + Begin OptionGroup + SpecialEffect =3 + BorderLineStyle =0 + BackThemeColorIndex =1 + BorderThemeColorIndex =1 + BorderShade =65.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + End Begin TextBox AddColon = NotDefault FELineBreak = NotDefault @@ -123,6 +142,22 @@ Begin Form GridlineThemeColorIndex =1 GridlineShade =65.0 End + Begin ListBox + BorderLineStyle =0 + LabelX =-1800 + FontSize =11 + FontName ="Calibri" + AllowValueListEdits =1 + InheritValueList =1 + ThemeFontIndex =1 + BackThemeColorIndex =1 + BorderThemeColorIndex =1 + BorderShade =65.0 + ForeThemeColorIndex =0 + ForeTint =75.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + End Begin ComboBox AddColon = NotDefault BorderLineStyle =0 @@ -164,7 +199,7 @@ Begin Form BorderColor =8355711 ForeColor =16777215 Name ="lblTitle" - Caption ="Set Observer/Recorder" + Caption ="Set Photo Info" GridlineColor =10921638 LayoutCachedLeft =180 LayoutCachedTop =60 @@ -177,16 +212,16 @@ Begin Form OverlapFlags =85 Left =180 Top =420 - Width =6840 + Width =7500 Height =315 BorderColor =8355711 ForeColor =16777164 Name ="lblDirections" - Caption ="Choose the observer && recorder for the record." + Caption ="Set the sampling event, photographer and type for the selected photos && update" GridlineColor =10921638 LayoutCachedLeft =180 LayoutCachedTop =420 - LayoutCachedWidth =7020 + LayoutCachedWidth =7680 LayoutCachedHeight =735 ForeThemeColorIndex =-1 ForeTint =100.0 @@ -232,7 +267,7 @@ Begin Form BorderColor =8355711 ForeColor =6750105 Name ="lblContext" - Caption ="BLCA > Gunnison > EP > C" + Caption ="context" GridlineColor =10921638 LayoutCachedLeft =3360 LayoutCachedTop =60 @@ -241,48 +276,8 @@ Begin Form ForeThemeColorIndex =-1 ForeTint =100.0 End - Begin Label - OverlapFlags =93 - TextAlign =2 - Left =1440 - Top =960 - Width =2100 - Height =315 - FontWeight =500 - BorderColor =8355711 - ForeColor =16777215 - Name ="lblObserver" - Caption ="Observer" - GridlineColor =10921638 - LayoutCachedLeft =1440 - LayoutCachedTop =960 - LayoutCachedWidth =3540 - LayoutCachedHeight =1275 - ForeThemeColorIndex =-1 - ForeTint =100.0 - End Begin Label OverlapFlags =85 - TextAlign =2 - Left =3720 - Top =960 - Width =2040 - Height =315 - FontWeight =500 - BorderColor =8355711 - ForeColor =16777215 - Name ="lblRecorder" - Caption ="Recorder" - GridlineColor =10921638 - LayoutCachedLeft =3720 - LayoutCachedTop =960 - LayoutCachedWidth =5760 - LayoutCachedHeight =1275 - ForeThemeColorIndex =-1 - ForeTint =100.0 - End - Begin Label - OverlapFlags =215 TextAlign =1 Left =108 Top =960 @@ -292,7 +287,6 @@ Begin Form BorderColor =8355711 ForeColor =6750156 Name ="lblRecordRefID" - Caption ="VegPlot ID # 6" GridlineColor =10921638 LayoutCachedLeft =108 LayoutCachedTop =960 @@ -305,18 +299,37 @@ Begin Form End Begin Section CanGrow = NotDefault - Height =5340 + Height =10935 Name ="Detail" AlternateBackColor =15921906 AlternateBackThemeColorIndex =1 AlternateBackShade =95.0 BackThemeColorIndex =1 Begin + Begin Rectangle + SpecialEffect =0 + BackStyle =1 + OldBorderStyle =0 + OverlapFlags =93 + Left =1080 + Top =2460 + Width =4860 + Height =3420 + BackColor =12566463 + BorderColor =10921638 + Name ="rctPhoto" + GridlineColor =10921638 + LayoutCachedLeft =1080 + LayoutCachedTop =2460 + LayoutCachedWidth =5940 + LayoutCachedHeight =5880 + BackShade =75.0 + End Begin CommandButton Enabled = NotDefault OverlapFlags =85 - Left =6720 - Top =60 + Left =6840 + Top =4320 Width =720 TabIndex =2 ForeColor =4210752 @@ -362,10 +375,10 @@ Begin Form 0x0000000000000000 End - LayoutCachedLeft =6720 - LayoutCachedTop =60 - LayoutCachedWidth =7440 - LayoutCachedHeight =420 + LayoutCachedLeft =6840 + LayoutCachedTop =4320 + LayoutCachedWidth =7560 + LayoutCachedHeight =4680 BackColor =14136213 BorderColor =14136213 HoverColor =65280 @@ -380,6 +393,7 @@ Begin Form Overlaps =1 End Begin TextBox + Visible = NotDefault TabStop = NotDefault OldBorderStyle =0 OverlapFlags =85 @@ -407,9 +421,10 @@ Begin Form ForeTint =50.0 End Begin CommandButton + Visible = NotDefault OverlapFlags =85 - Left =5940 - Top =60 + Left =6060 + Top =4320 Width =720 TabIndex =3 ForeColor =4210752 @@ -455,10 +470,10 @@ Begin Form 0x0000000000000000 End - LayoutCachedLeft =5940 - LayoutCachedTop =60 - LayoutCachedWidth =6660 - LayoutCachedHeight =420 + LayoutCachedLeft =6060 + LayoutCachedTop =4320 + LayoutCachedWidth =6780 + LayoutCachedHeight =4680 BackColor =14136213 BorderColor =14136213 HoverColor =65280 @@ -474,9 +489,9 @@ Begin Form End Begin Subform CanShrink = NotDefault - OverlapFlags =247 + OverlapFlags =215 Left =105 - Top =840 + Top =6435 Width =7650 Height =4380 TabIndex =5 @@ -486,28 +501,29 @@ Begin Form GridlineColor =10921638 LayoutCachedLeft =105 - LayoutCachedTop =840 + LayoutCachedTop =6435 LayoutCachedWidth =7755 - LayoutCachedHeight =5220 + LayoutCachedHeight =10815 End Begin Rectangle SpecialEffect =0 BackStyle =1 OldBorderStyle =0 OverlapFlags =93 - Top =720 + Top =6315 Width =7860 Height =4620 BackColor =4144959 BorderColor =10921638 Name ="rctList" GridlineColor =10921638 - LayoutCachedTop =720 + LayoutCachedTop =6315 LayoutCachedWidth =7860 - LayoutCachedHeight =5340 + LayoutCachedHeight =10935 BackThemeColorIndex =-1 End Begin TextBox + Visible = NotDefault TabStop = NotDefault OldBorderStyle =0 OverlapFlags =85 @@ -541,11 +557,12 @@ Begin Form TextAlign =2 IMESentenceMode =3 ColumnCount =2 - Left =1380 - Top =60 - Width =2160 + Left =2580 + Top =480 + Width =2820 Height =315 FontSize =8 + TabIndex =1 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -556,22 +573,297 @@ Begin Form 0x5b007400620078005300740061007200740044006100740065005d002e005600 , 0x61006c00750065003d0022002200000000002200220000000000 End - Name ="cbxObserver" + Name ="cbxPhotographer" RowSourceType ="Table/Query" ColumnWidths ="0;2160" AfterUpdate ="[Event Procedure]" - ControlTipText ="Select data observer" + ControlTipText ="Select photographer" + GridlineColor =10921638 + AllowValueListEdits =0 + + LayoutCachedLeft =2580 + LayoutCachedTop =480 + LayoutCachedWidth =5400 + LayoutCachedHeight =795 + BackThemeColorIndex =-1 + ForeThemeColorIndex =0 + ForeTint =75.0 + ForeShade =100.0 + ConditionalFormat14 = Begin + 0x01000200000001000000000000000100000000000000fff20000170000005b00 , + 0x7400620078005300740061007200740044006100740065005d002e0056006100 , + 0x6c00750065003d00220022000000000000000000000000000000000000000000 , + 0x0000000000030000000100000000000000ffffff000200000022002200000000 , + 0x000000000000000000000000000000000000 + End + End + Begin Label + BackStyle =1 + OverlapFlags =223 + TextAlign =3 + Top =6120 + Width =7860 + Height =315 + FontSize =9 + LeftMargin =360 + TopMargin =36 + RightMargin =360 + BackColor =4144959 + BorderColor =8355711 + ForeColor =6750105 + Name ="lblMsg" + FontName ="Segoe UI" + GridlineColor =10921638 + LayoutCachedTop =6120 + LayoutCachedWidth =7860 + LayoutCachedHeight =6435 + ThemeFontIndex =-1 + BackThemeColorIndex =-1 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin Label + OverlapFlags =223 + TextAlign =2 + Left =4320 + Top =5940 + Width =825 + Height =600 + FontSize =20 + BackColor =4144959 + BorderColor =8355711 + ForeColor =6750105 + Name ="lblMsgIcon" + FontName ="Segoe UI" + GridlineColor =10921638 + LayoutCachedLeft =4320 + LayoutCachedTop =5940 + LayoutCachedWidth =5145 + LayoutCachedHeight =6540 + ThemeFontIndex =-1 + BackThemeColorIndex =-1 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin ListBox + ColumnHeads = NotDefault + OverlapFlags =215 + MultiSelect =2 + IMESentenceMode =3 + Left =1320 + Top =2940 + Width =4380 + Height =2820 + FontSize =8 + BackColor =65535 + ForeColor =4210752 + BorderColor =10921638 + Name ="lbxPhotos" + RowSourceType ="Table/Query" + AfterUpdate ="[Event Procedure]" + ControlTipText ="Select photos to update" + GridlineColor =10921638 + AllowValueListEdits =0 + + LayoutCachedLeft =1320 + LayoutCachedTop =2940 + LayoutCachedWidth =5700 + LayoutCachedHeight =5760 + BackThemeColorIndex =-1 + End + Begin Label + OverlapFlags =85 + Left =1080 + Top =60 + Width =600 + Height =315 + FontWeight =500 + BorderColor =8355711 + ForeColor =8355711 + Name ="lblEvent" + Caption ="Event" + GridlineColor =10921638 + LayoutCachedLeft =1080 + LayoutCachedTop =60 + LayoutCachedWidth =1680 + LayoutCachedHeight =375 + End + Begin ComboBox + LimitToList = NotDefault + OverlapFlags =85 + IMESentenceMode =3 + ColumnCount =5 + Left =1980 + Top =60 + Width =3414 + Height =315 + TabIndex =7 + BackColor =65535 + BorderColor =10921638 + ForeColor =4210752 + ConditionalFormat = Begin + 0x01000000a0000000020000000100000000000000000000001b00000001000000 , + 0x00000000fff2000000000000030000001c0000001f0000000100000000000000 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x5b007400620078004d006f00640061006c00530065006400530069007a006500 , + 0x5d002e00560061006c00750065003d0022002200000000002200220000000000 + End + Name ="cbxEvent" + RowSourceType ="Table/Query" + ColumnWidths ="0;0;0;0;2880" + AfterUpdate ="[Event Procedure]" + ControlTipText ="Event (sample visit)" GridlineColor =10921638 AllowValueListEdits =0 - LayoutCachedLeft =1380 + LayoutCachedLeft =1980 LayoutCachedTop =60 - LayoutCachedWidth =3540 + LayoutCachedWidth =5394 LayoutCachedHeight =375 BackThemeColorIndex =-1 ForeThemeColorIndex =0 ForeTint =75.0 ForeShade =100.0 + ConditionalFormat14 = Begin + 0x01000200000001000000000000000100000000000000fff200001a0000005b00 , + 0x7400620078004d006f00640061006c00530065006400530069007a0065005d00 , + 0x2e00560061006c00750065003d00220022000000000000000000000000000000 , + 0x0000000000000000000000030000000100000000000000ffffff000200000022 , + 0x002200000000000000000000000000000000000000000000 + End + End + Begin CommandButton + OverlapFlags =85 + Left =5520 + Top =60 + TabIndex =8 + ForeColor =16711680 + Name ="btnAddEvent" + Caption ="🗓 Add Event" + OnClick ="[Event Procedure]" + ControlTipText ="Add a new event/sampling visit" + GridlineColor =10921638 + + LayoutCachedLeft =5520 + LayoutCachedTop =60 + LayoutCachedWidth =6960 + LayoutCachedHeight =420 + ForeThemeColorIndex =-1 + BackColor =14136213 + BorderColor =14136213 + HoverColor =65280 + HoverThemeColorIndex =-1 + PressedColor =9592887 + HoverForeColor =4210752 + PressedForeColor =4210752 + WebImagePaddingLeft =2 + WebImagePaddingTop =2 + WebImagePaddingRight =1 + WebImagePaddingBottom =1 + Overlaps =1 + End + Begin Label + OverlapFlags =215 + TextAlign =2 + Left =1080 + Top =2160 + Width =720 + Height =315 + FontWeight =500 + BorderColor =8355711 + ForeColor =8355711 + Name ="lblUnclassifiedPhotos" + Caption ="Photos" + GridlineColor =10921638 + LayoutCachedLeft =1080 + LayoutCachedTop =2160 + LayoutCachedWidth =1800 + LayoutCachedHeight =2475 + End + Begin Label + OverlapFlags =85 + TextAlign =2 + Left =1080 + Top =480 + Width =1350 + Height =315 + FontWeight =500 + BorderColor =8355711 + ForeColor =8355711 + Name ="lblPhotographer" + Caption ="Photographer" + GridlineColor =10921638 + LayoutCachedLeft =1080 + LayoutCachedTop =480 + LayoutCachedWidth =2430 + LayoutCachedHeight =795 + End + Begin CommandButton + OverlapFlags =85 + Left =5520 + Top =480 + Width =720 + TabIndex =9 + ForeColor =4210752 + Name ="btnAddContact" + Caption ="👥" + OnClick ="[Event Procedure]" + GridlineColor =10921638 + + LayoutCachedLeft =5520 + LayoutCachedTop =480 + LayoutCachedWidth =6240 + LayoutCachedHeight =840 + BackColor =14136213 + BorderColor =14136213 + HoverColor =65280 + HoverThemeColorIndex =-1 + PressedColor =9592887 + HoverForeColor =4210752 + PressedForeColor =4210752 + WebImagePaddingLeft =2 + WebImagePaddingTop =2 + WebImagePaddingRight =1 + WebImagePaddingBottom =1 + Overlaps =1 + End + Begin ComboBox + LimitToList = NotDefault + OverlapFlags =215 + TextAlign =2 + IMESentenceMode =3 + ColumnCount =2 + Left =2040 + Top =2580 + Width =3720 + Height =315 + FontSize =8 + TabIndex =10 + BackColor =65535 + BorderColor =10921638 + ForeColor =4210752 + ConditionalFormat = Begin + 0x010000009a000000020000000100000000000000000000001800000001000000 , + 0x00000000fff200000000000003000000190000001c0000000100000000000000 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x5b007400620078005300740061007200740044006100740065005d002e005600 , + 0x61006c00750065003d0022002200000000002200220000000000 + End + Name ="cbxPhotoFilter" + RowSourceType ="Table/Query" + ColumnWidths ="0;2160" + ControlTipText ="Select photo type(s) to display" + GridlineColor =10921638 + AllowValueListEdits =0 + + LayoutCachedLeft =2040 + LayoutCachedTop =2580 + LayoutCachedWidth =5760 + LayoutCachedHeight =2895 + BackThemeColorIndex =-1 + ForeThemeColorIndex =0 + ForeTint =75.0 + ForeShade =100.0 ConditionalFormat14 = Begin 0x01000200000001000000000000000100000000000000fff20000170000005b00 , 0x7400620078005300740061007200740044006100740065005d002e0056006100 , @@ -580,18 +872,89 @@ Begin Form 0x000000000000000000000000000000000000 End End + Begin Label + OverlapFlags =215 + TextAlign =2 + Left =1320 + Top =2580 + Width =570 + Height =315 + FontWeight =500 + BorderColor =8355711 + ForeColor =4210752 + Name ="lblPhotoFilter" + Caption ="Filter" + GridlineColor =10921638 + LayoutCachedLeft =1320 + LayoutCachedTop =2580 + LayoutCachedWidth =1890 + LayoutCachedHeight =2895 + ForeTint =75.0 + End + Begin CommandButton + Enabled = NotDefault + OverlapFlags =85 + Left =6240 + Top =5640 + TabIndex =11 + ForeColor =16711680 + Name ="btnUpdatePhotos" + Caption ="🗓 Update Photos" + OnClick ="[Event Procedure]" + ControlTipText ="Update photos" + GridlineColor =10921638 + + LayoutCachedLeft =6240 + LayoutCachedTop =5640 + LayoutCachedWidth =7680 + LayoutCachedHeight =6000 + ForeThemeColorIndex =-1 + BackColor =14136213 + BorderColor =14136213 + HoverColor =65280 + HoverThemeColorIndex =-1 + PressedColor =9592887 + HoverForeColor =4210752 + PressedForeColor =4210752 + WebImagePaddingLeft =2 + WebImagePaddingTop =2 + WebImagePaddingRight =1 + WebImagePaddingBottom =1 + Overlaps =1 + End + Begin Label + FontItalic = NotDefault + OverlapFlags =85 + Left =1080 + Top =1320 + Width =6120 + Height =720 + FontSize =8 + FontWeight =500 + BorderColor =8355711 + ForeColor =16737792 + Name ="lblPhotoTypesHint" + Caption ="Photo types hint" + GridlineColor =10921638 + LayoutCachedLeft =1080 + LayoutCachedTop =1320 + LayoutCachedWidth =7200 + LayoutCachedHeight =2040 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End Begin ComboBox LimitToList = NotDefault - OverlapFlags =93 + OverlapFlags =85 TextAlign =2 IMESentenceMode =3 ColumnCount =2 - Left =3660 - Top =60 - Width =2160 + Left =2580 + Top =900 + Width =2820 Height =315 FontSize =8 - TabIndex =1 + TabIndex =12 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -602,18 +965,18 @@ Begin Form 0x5b007400620078005300740061007200740044006100740065005d002e005600 , 0x61006c00750065003d0022002200000000002200220000000000 End - Name ="cbxRecorder" + Name ="cbxPhotoType" RowSourceType ="Table/Query" ColumnWidths ="0;2160" AfterUpdate ="[Event Procedure]" - ControlTipText ="Select data recorder" + ControlTipText ="Select desired photo type" GridlineColor =10921638 AllowValueListEdits =0 - LayoutCachedLeft =3660 - LayoutCachedTop =60 - LayoutCachedWidth =5820 - LayoutCachedHeight =375 + LayoutCachedLeft =2580 + LayoutCachedTop =900 + LayoutCachedWidth =5400 + LayoutCachedHeight =1215 BackThemeColorIndex =-1 ForeThemeColorIndex =0 ForeTint =75.0 @@ -627,52 +990,23 @@ Begin Form End End Begin Label - BackStyle =1 - OverlapFlags =223 - TextAlign =3 - Top =525 - Width =7860 + OverlapFlags =85 + TextAlign =1 + Left =1080 + Top =900 + Width =1350 Height =315 - FontSize =9 - LeftMargin =360 - TopMargin =36 - RightMargin =360 - BackColor =4144959 - BorderColor =8355711 - ForeColor =6750105 - Name ="lblMsg" - FontName ="Segoe UI" - GridlineColor =10921638 - LayoutCachedTop =525 - LayoutCachedWidth =7860 - LayoutCachedHeight =840 - ThemeFontIndex =-1 - BackThemeColorIndex =-1 - ForeThemeColorIndex =-1 - ForeTint =100.0 - End - Begin Label - OverlapFlags =255 - TextAlign =2 - Left =4320 - Top =345 - Width =825 - Height =600 - FontSize =20 - BackColor =4144959 + FontWeight =500 BorderColor =8355711 - ForeColor =6750105 - Name ="lblMsgIcon" - FontName ="Segoe UI" + ForeColor =8355711 + Name ="lblPhotoType" + Caption ="Photo Type" + ControlTipText ="Select desired photo type" GridlineColor =10921638 - LayoutCachedLeft =4320 - LayoutCachedTop =345 - LayoutCachedWidth =5145 - LayoutCachedHeight =945 - ThemeFontIndex =-1 - BackThemeColorIndex =-1 - ForeThemeColorIndex =-1 - ForeTint =100.0 + LayoutCachedLeft =1080 + LayoutCachedTop =900 + LayoutCachedWidth =2430 + LayoutCachedHeight =1215 End End End @@ -694,17 +1028,17 @@ Option Compare Database Option Explicit ' ================================= -' Form: SetObserverRecorder +' Form: PhotoBatchUpdate ' Level: Application form ' Version: 1.01 ' Basis: Dropdown form ' -' Description: Observer / recorder setting form object related properties, events, functions & procedures for UI display +' Description: Batch photo form object related properties, events, functions & procedures for UI display ' -' Source/date: Bonnie Campbell, September 8, 2016 +' Source/date: Bonnie Campbell, December 8, 2017 ' References: - -' Revisions: BLC - 9/1/2016 - 1.00 - initial version -' BLC - 10/19/2017 - 1.01 - added comment length & replaced event w/ observerrecorder +' Revisions: BLC - 12/8/2017 - 1.00 - initial version +' BLC - 12/11/2017 - 1.01 - renamed PhotoBatchUpdate vs PhotoBulkUpdate ' ================================= '--------------------- @@ -716,34 +1050,16 @@ Option Explicit '--------------------- Private m_Title As String Private m_Directions As String -Private m_ButtonCaption -Private m_SelectedID As Integer -Private m_SelectedValue As String Private m_CallingForm As String Private m_SaveOK As Boolean 'ok to save record (prevents bound form from immediately updating) -Private m_RefTable As String -Private m_RefID As Long - -Private m_ObserverID As Long -Private m_RecorderID As Long - -Private m_RAAction As String -Private m_RAContactID As Long - '--------------------- ' Event Declarations '--------------------- Public Event InvalidTitle(Value As String) Public Event InvalidDirections(Value As String) -Public Event InvalidLabel(Value As String) -Public Event InvalidCaption(Value As String) Public Event InvalidCallingForm(Value As String) -Public Event InvalidRefTable(Value As String) -Public Event InvalidRefID(Value As Long) -Public Event InvalidRAAction(Value As String) -Public Event InvalidRAContactID(Value As Long) '--------------------- ' Properties @@ -779,37 +1095,6 @@ Public Property Get Directions() As String Directions = m_Directions End Property -Public Property Let ButtonCaption(Value As String) - If Len(Value) > 0 Then - m_ButtonCaption = Value - - 'set the form button caption - Me.btnSave.Caption = m_ButtonCaption - Else - RaiseEvent InvalidCaption(Value) - End If -End Property - -Public Property Get ButtonCaption() As String - ButtonCaption = m_ButtonCaption -End Property - -Public Property Let SelectedID(Value As Integer) - m_SelectedID = Value -End Property - -Public Property Get SelectedID() As Integer - SelectedID = m_SelectedID -End Property - -Public Property Let SelectedValue(Value As String) - m_SelectedValue = Value -End Property - -Public Property Get SelectedValue() As String - SelectedValue = m_SelectedValue -End Property - Public Property Let CallingForm(Value As String) If Len(Value) > 0 Then m_CallingForm = Value @@ -822,68 +1107,6 @@ Public Property Get CallingForm() As String CallingForm = m_CallingForm End Property -Public Property Let RefTable(Value As String) - If Len(Value) > 0 Then - m_RefTable = Value - Else - RaiseEvent InvalidRefTable(Value) - End If -End Property - -Public Property Get RefTable() As String - RefTable = m_RefTable -End Property - -Public Property Get RefID() As Long - RefID = m_RefID -End Property - -Public Property Let RefID(Value As Long) - m_RefID = Value -End Property - -Public Property Get ObserverID() As Long - ObserverID = m_ObserverID -End Property - -Public Property Let ObserverID(Value As Long) - m_ObserverID = Value -End Property - -Public Property Get RecorderID() As Long - RecorderID = m_RecorderID -End Property - -Public Property Let RecorderID(Value As Long) - m_RecorderID = Value -End Property - -'Record Action properties -Public Property Let RAAction(Value As String) - If Len(Value) > 0 Then - If InStr(Value, "O") + InStr(Value, "R") > 0 Then - m_RAAction = Value - Else - RaiseEvent InvalidRAAction(Value) - End If - Else - RaiseEvent InvalidRAAction(Value) - End If -End Property - -Public Property Get RAAction() As String - RAAction = m_RAAction -End Property - -Public Property Get RAContactID() As Long - RAContactID = m_RAContactID -End Property - -Public Property Let RAContactID(Value As Long) - m_RAContactID = Value -End Property - - '--------------------- ' Methods '--------------------- @@ -896,10 +1119,10 @@ End Property ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 9/8/2016 - initial version +' BLC - 12/8/2017 - initial version ' --------------------------------- Private Sub Form_Open(Cancel As Integer) On Error GoTo Err_Handler @@ -914,11 +1137,6 @@ On Error GoTo Err_Handler Me.CallingForm = Split(Me.OpenArgs, "|")(0) lblRecordRefID.Caption = Me.CallingForm _ & " ID # " & Split(Me.OpenArgs, "|")(1) - - 'set properties - Me.RefTable = Me.CallingForm - Me.RefID = Split(Me.OpenArgs, "|")(1) - End If 'minimize Main @@ -927,23 +1145,40 @@ On Error GoTo Err_Handler 'set context - based on TempVars lblContext.ForeColor = lngLime lblContext.Caption = GetContext() - 'Nz(TempVars("ParkCode"), "") & Space(2) & ">" & Space(2) & _ - ' Nz(TempVars("River"), "") - Title = "Set Observer/Recorder" - Directions = "Choose the observer && recorder for the record." + Title = "Set Photo Info" + Directions = "Set the sampling event, photographer and type for the selected photos." tbxIcon.Value = StringFromCodepoint(uBullet) lblDirections.ForeColor = lngLtBlue + lblPhotoTypesHint.Caption = "Photo Types: " & vbCrLf & _ + "F-feature" & Space(2) & "T-transect" & Space(2) & "V-overview" & Space(2) & "R-reference" & Space(2) & "U-unclassified " & vbCrLf & _ + "OA-OtherAnimal" & Space(2) & "OP-Plant" & Space(2) & "OC-Cultural" & Space(2) & "OD-Disturbance" & Space(2) & "OF-Field Work" & Space(2) & "OS-Scenic" & Space(2) & "OW-Weather" & Space(2) & "OO-Other" + lblPhotoTypesHint.ForeColor = lngBlue btnComment.Caption = StringFromCodepoint(uComment) btnComment.ForeColor = lngBlue - + btnAddEvent.Caption = StringFromCodepoint(uCalendarSpiral) & Space(2) & "Add Event" + btnAddEvent.ForeColor = lngBlue + btnAddContact.Caption = StringFromCodepoint(uUsers) & Space(2) & "Add Photographer" + btnAddContact.ForeColor = lngBlue + btnUpdatePhotos.Caption = StringFromCodepoint(uPicFramed) & Space(2) & "Update Photos" + btnUpdatePhotos.ForeColor = lngBlue + lblRecordRefID.ForeColor = lngLtLime 'set hover + btnAddEvent.HoverColor = lngGreen + btnAddContact.HoverColor = lngGreen + btnUpdatePhotos.HoverColor = lngGreen btnComment.HoverColor = lngGreen btnSave.HoverColor = lngGreen btnUndo.HoverColor = lngGreen + 'hidden (unused) controls + btnSave.Visible = False + btnUndo.Visible = False + lblPhotoFilter.Visible = False + cbxPhotoFilter.Visible = False + 'defaults tbxIcon.ForeColor = lngRed btnComment.Enabled = False @@ -958,16 +1193,49 @@ On Error GoTo Err_Handler Me.RecordSource = "" 'set data sources - Set cbxObserver.Recordset = GetRecords("s_contact_list") - Set cbxRecorder.Recordset = GetRecords("s_contact_list") + Set cbxPhotographer.Recordset = GetRecords("s_contact_list") + Set lbxPhotos.Recordset = GetRecords("s_usys_temp_photo_list") + Set cbxPhotoType.Recordset = GetRecords("") - 'set list data source - Dim Params(0 To 2) As Variant + 'determine what level to populate + Dim efilter As String + + 'site is default + efilter = "s_events_by_site" + cbxEvent.ColumnCount = 6 + cbxEvent.ColumnWidths = "0;0;0;2in;0;0" + + Select Case TempVars("ParkCode") + Case "BLCA" 'feature level if set + If Not TempVars("Feature") Is Nothing Then _ + efilter = "s_events_by_feature" + Case "CANY" 'site level + Case "DINO" 'no transects/plots + End Select + + 'populate events + Set cbxEvent.Recordset = GetRecords(efilter) + cbxEvent.BoundColumn = 1 + 'cbxEvent.ColumnCount = 5 + 'cbxEvent.ColumnWidths = "0in;0in;0in;0in;2in" - Params(0) = Me.RefTable - Params(1) = Me.RefID + 'populate photo types + cbxPhotoType.BoundColumn = 1 + cbxPhotoType.ColumnCount = 2 + cbxPhotoType.ColumnWidths = "1in;3in" - Set Me.list.Form.Recordset = GetRecords("s_record_action_by_refID", Params) + 'populate photo list + 'Event_ID , Photographer_ID, PhotoPath, PhotoFilename, PhotoDate, PhotoType + lbxPhotos.ColumnHeads = True + lbxPhotos.BoundColumn = 1 + lbxPhotos.ColumnCount = 7 + lbxPhotos.ColumnWidths = "0;0.3in;0;2.4in;1in;0;0;" + 'lbxPhotos.MultiSelect = True + 'lbxPhotos.MultiSelect = '"Extended" + + 'set list data source + +' Set Me.list.Form.Recordset = GetRecords("s_record_action_by_refID", Params) Me.list.Form.Requery 'initialize values @@ -979,7 +1247,7 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Form_Open[SetObserverRecorder form])" + "Error encountered (#" & Err.Number & " - Form_Open[PhotoBatchUpdate form])" End Select Resume Exit_Handler End Sub @@ -992,10 +1260,10 @@ End Sub ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 9/8/2016 - initial version +' BLC - 12/8/2017 - initial version ' --------------------------------- Private Sub Form_Load() On Error GoTo Err_Handler @@ -1009,7 +1277,7 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Form_Load[SetObserverRecorder form])" + "Error encountered (#" & Err.Number & " - Form_Load[PhotoBatchUpdate form])" End Select Resume Exit_Handler End Sub @@ -1022,10 +1290,10 @@ End Sub ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, June 1, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 6/1/2016 - initial version +' BLC - 12/8/2017 - initial version ' --------------------------------- Private Sub Form_Current() On Error GoTo Err_Handler @@ -1040,7 +1308,7 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Form_Current[SetObserverRecorder form])" + "Error encountered (#" & Err.Number & " - Form_Current[PhotoBatchUpdate form])" End Select Resume Exit_Handler End Sub @@ -1053,12 +1321,12 @@ End Sub ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, August 22, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 8/22/2016 - initial version +' BLC - 12/8/2017 - initial version ' --------------------------------- -Private Sub zForm_BeforeUpdate(Cancel As Integer) +Private Sub Form_BeforeUpdate(Cancel As Integer) On Error GoTo Err_Handler If Not m_SaveOK Then @@ -1072,28 +1340,91 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Form_BeforeUpdate[SetObserverRecorder form])" + "Error encountered (#" & Err.Number & " - Form_BeforeUpdate[PhotoBatchUpdate form])" End Select Resume Exit_Handler End Sub ' --------------------------------- -' Sub: cbxObserver_AfterUpdate +' Sub: cbxPhotographer_AfterUpdate ' Description: Dropdown after update actions ' Assumptions: - ' Parameters: - ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/8/2017 - initial version +' --------------------------------- +Private Sub cbxPhotographer_AfterUpdate() +On Error GoTo Err_Handler + +' Me.PhotographerID = cbxPhotographer.Value + + ReadyForSave + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - cbxPhotographer_AfterUpdate[SetPhotographerPhotographer form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: cbxEvent_AfterUpdate +' Description: Combobox after update actions +' Assumptions: Event combobox contains the following columns: +' column(0)= event ID column(3)= event date - site name (sitecode) +' column(1)= event date column(4)= site code +' column(2)= event date - site code column(5)= park code +' Column 1 (event date) will be used to determine the proper MSS year +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 9/8/2016 - initial version +' BLC - 12/8/2017 - initial version ' --------------------------------- -Private Sub cbxObserver_AfterUpdate() +Private Sub cbxEvent_AfterUpdate() On Error GoTo Err_Handler + + 'check if ready + ReadyForSave + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - cbxEvent_AfterUpdate[PhotoBatchUpdate form])" + End Select + Resume Exit_Handler +End Sub - Me.ObserverID = cbxObserver.Value +' --------------------------------- +' Sub: cbxPhotoType_AfterUpdate +' Description: Dropdown after update actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, December 11, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/11/2017 - initial version +' --------------------------------- +Private Sub cbxPhotoType_AfterUpdate() +On Error GoTo Err_Handler ReadyForSave @@ -1103,28 +1434,28 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - cbxObserver_AfterUpdate[SetObserverObserver form])" + "Error encountered (#" & Err.Number & " - cbxPhotoType_AfterUpdate[SetPhotoTypePhotoType form])" End Select Resume Exit_Handler End Sub ' --------------------------------- -' Sub: cbxRecorder_AfterUpdate +' Sub: lbxPhotos_AfterUpdate ' Description: Dropdown after update actions ' Assumptions: - ' Parameters: - ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 9/8/2016 - initial version +' BLC - 12/8/2017 - initial version ' --------------------------------- -Private Sub cbxRecorder_AfterUpdate() +Private Sub lbxPhotos_AfterUpdate() On Error GoTo Err_Handler - Me.RecorderID = cbxRecorder.Value + 'Me.RecorderID = lbxPhotos.Value ReadyForSave @@ -1134,7 +1465,7 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - cbxRecorder_AfterUpdate[SetObserverRecorder form])" + "Error encountered (#" & Err.Number & " - lbxPhotos_AfterUpdate[PhotoBatchUpdate form])" End Select Resume Exit_Handler End Sub @@ -1147,10 +1478,10 @@ End Sub ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, June 1, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 6/1/2016 - initial version +' BLC - 12/8/2017 - initial version ' --------------------------------- Private Sub btnUndo_Click() On Error GoTo Err_Handler @@ -1163,7 +1494,71 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - btnUndo_Click[SetObserverRecorder form])" + "Error encountered (#" & Err.Number & " - btnUndo_Click[PhotoBatchUpdate form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnAddEvent_Click +' Description: Add event button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/8/2017 - initial version +' --------------------------------- +Private Sub btnAddEvent_Click() +On Error GoTo Err_Handler + + 'open form + DoCmd.OpenForm "Events", acNormal, , , , , Me.Name + + 'refresh cbx (done from event form close) + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnAddEvent_Click[PhotoBatchUpdate form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnAddContact_Click +' Description: Add Contact button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/8/2017 - initial version +' --------------------------------- +Private Sub btnAddContact_Click() +On Error GoTo Err_Handler + + 'open form + DoCmd.OpenForm "Contact", acNormal, , , , , Me.Name + + 'refresh cbx (done from Contact form close) + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnAddContact_Click[PhotoBatchUpdate form])" End Select Resume Exit_Handler End Sub @@ -1176,51 +1571,83 @@ End Sub ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 9/8/2016 - initial version -' BLC - 9/1/2016 - cleanup commented code +' BLC - 12/8/2017 - initial version ' --------------------------------- Private Sub btnSave_Click() On Error GoTo Err_Handler 'set enable btnSave_Click save m_SaveOK = True + + UpsertRecord Me -' 'pre-save form -' Me![list].Form.Dirty = False + Me![list].Form.Requery -' 'run for observer -' Me.RAAction = "O" -' Me.RAContactID = Me.ObserverID -' -' UpsertRecord Me -' -' 'run for recorder -' Me.RAAction = "R" -' Me.RAContactID = Me.RecorderID -' -' UpsertRecord Me + 'revert to disable non-btnSave_Click save + m_SaveOK = False + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnSave_Click[PhotoBatchUpdate form])" + End Select + Resume Exit_Handler +End Sub -' SetObserverRecorder Me, Me.RefTable +' --------------------------------- +' Sub: btnUpdatePhotos_Click +' Description: Update photos button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, December 11, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/11/2017 - initial version +' --------------------------------- +Private Sub btnUpdatePhotos_Click() +On Error GoTo Err_Handler + + 'set enable btnSave_Click save + m_SaveOK = True + + Dim i As Integer + + With lbxPhotos + If .ItemsSelected.Count > 0 Then + Debug.Print "#selected" & .ItemsSelected.Count + For i = 1 To .ItemsSelected.Count + 'UpsertRecord Me + Debug.Print .ItemData(i) + Next + End If + End With + + UpsertRecord Me Me![list].Form.Requery 'revert to disable non-btnSave_Click save m_SaveOK = False - + Exit_Handler: Exit Sub Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - btnSave_Click[SetObserverRecorder form])" + "Error encountered (#" & Err.Number & " - btnUpdatePhotos_Click[PhotoBatchUpdate form])" End Select Resume Exit_Handler End Sub - ' --------------------------------- ' Sub: btnComment_Click ' Description: Undo button click actions @@ -1229,17 +1656,16 @@ End Sub ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, June 1, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 6/1/2016 - initial version -' BLC - 10/19/2017 - added comment length & replaced event w/ observerrecorder +' BLC - 12/8/2017 - initial version ' --------------------------------- Private Sub btnComment_Click() On Error GoTo Err_Handler 'open comment form - DoCmd.OpenForm "Comment", acNormal, , , , , "observerrecorder|" & tbxID & "|255" + DoCmd.OpenForm "Comment", acNormal, , , , , "photoBatchupdate|" & tbxID & "|255" Exit_Handler: Exit Sub @@ -1247,7 +1673,7 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - btnComment_Click[SetObserverRecorder form])" + "Error encountered (#" & Err.Number & " - btnComment_Click[PhotoBatchUpdate form])" End Select Resume Exit_Handler End Sub @@ -1260,11 +1686,10 @@ End Sub ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 9/8/2016 - initial version -' BLC - 8/2/2016 - use Me.CallingForm +' BLC - 12/8/2017 - initial version ' --------------------------------- Private Sub Form_Close() On Error GoTo Err_Handler @@ -1278,7 +1703,7 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Form_Close[SetObserverRecorder form])" + "Error encountered (#" & Err.Number & " - Form_Close[PhotoBatchUpdate form])" End Select Resume Exit_Handler End Sub @@ -1291,11 +1716,10 @@ End Sub ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 9/8/2016 - initial version -' BLC - 8/23/2016 - changed ReadyForSave() to public for mod_App_Data Upsert/SetRecord() +' BLC - 12/8/2017 - initial version ' --------------------------------- Public Sub ReadyForSave() On Error GoTo Err_Handler @@ -1306,13 +1730,18 @@ On Error GoTo Err_Handler isOK = False 'set color of icon depending on if values are set - 'requires: site ID, location ID, protocol ID, start date - 'If IsDate(tbxStartDate) Then - isOK = True - 'End If + 'requires: Event_ID, Photographer_ID, PhotoType, Photos selected + If cbxEvent > 0 _ + And IsInt(cbxPhotographer) _ + And IsInt(cbxPhotoType) _ + And lbxPhotos.ItemsSelected.Count > 0 _ + Then + isOK = True + End If tbxIcon.ForeColor = IIf(isOK = True, lngDkGreen, lngRed) - btnSave.Enabled = isOK + 'btnSave.Enabled = isOK + btnUpdatePhotos.Enabled = isOK 'refresh form ' Me.Requery @@ -1323,7 +1752,7 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - ReadyForSave[SetObserverRecorder form])" + "Error encountered (#" & Err.Number & " - ReadyForSave[PhotoBatchUpdate form])" End Select Resume Exit_Handler End Sub @@ -1336,10 +1765,10 @@ End Sub ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 8, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 6/26/2016 - initial version +' BLC - 12/8/2017 - initial version ' --------------------------------- Public Sub RunReadyForSave() On Error GoTo Err_Handler @@ -1352,7 +1781,7 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - RunReadyForSave[SetObserverRecorder form])" + "Error encountered (#" & Err.Number & " - RunReadyForSave[PhotoBatchUpdate form])" End Select Resume Exit_Handler End Sub diff --git a/source/forms/PhotoFTORDetails.bas b/source/forms/PhotoFTORDetails.bas index fb936ba..7a39bcc 100644 --- a/source/forms/PhotoFTORDetails.bas +++ b/source/forms/PhotoFTORDetails.bas @@ -12,8 +12,8 @@ Begin Form GridY =24 Width =6780 DatasheetFontHeight =11 - ItemSuffix =56 - Right =9645 + ItemSuffix =57 + Right =8940 Bottom =11385 DatasheetGridlinesColor =14806254 RecSrcDt = Begin @@ -719,7 +719,7 @@ Begin Form FontWeight =500 BorderColor =8355711 ForeColor =8355711 - Name ="Label43" + Name ="lblComments" Caption ="Comments" GridlineColor =10921638 LayoutCachedLeft =540 @@ -1055,6 +1055,43 @@ Begin Form 0x0000000000 End End + Begin TextBox + OverlapFlags =85 + BackStyle =0 + IMESentenceMode =3 + Left =120 + Top =6000 + Width =480 + FontSize =8 + TabIndex =13 + BorderColor =8355711 + ForeColor =8355711 + Name ="tbxPhotoType" + ConditionalFormat = Begin + 0x0100000098000000020000000100000000000000000000000d00000001000000 , + 0x3333ff00ffffff0001000000000000000e0000001b00000001000000ffffff00 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x5b004400450056005f004d004f00440045005d003d003100000000005b004400 , + 0x450056005f004d004f00440045005d003d00300000000000 + End + GridlineColor =10921638 + + LayoutCachedLeft =120 + LayoutCachedTop =6000 + LayoutCachedWidth =600 + LayoutCachedHeight =6240 + BorderThemeColorIndex =0 + BorderTint =50.0 + BorderShade =100.0 + ForeTint =50.0 + ConditionalFormat14 = Begin + 0x0100020000000100000000000000010000003333ff00ffffff000c0000005b00 , + 0x4400450056005f004d004f00440045005d003d00310000000000000000000000 , + 0x0000000000000000000000010000000000000001000000ffffff00ffffff000c , + 0x0000005b004400450056005f004d004f00440045005d003d0030000000000000 , + 0x00000000000000000000000000000000 + End + End End End Begin Section diff --git a/source/forms/PhotoOtherDetails.bas b/source/forms/PhotoOtherDetails.bas index 6e2db3a..cdf8f6e 100644 --- a/source/forms/PhotoOtherDetails.bas +++ b/source/forms/PhotoOtherDetails.bas @@ -13,8 +13,8 @@ Begin Form Width =6420 DatasheetFontHeight =11 ItemSuffix =55 - Right =18135 - Bottom =10305 + Right =8940 + Bottom =11385 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x36469deccdc4e440 @@ -548,6 +548,43 @@ Begin Form WebImagePaddingRight =1 WebImagePaddingBottom =1 End + Begin TextBox + OverlapFlags =85 + BackStyle =0 + IMESentenceMode =3 + Left =120 + Top =3420 + Width =480 + FontSize =8 + TabIndex =6 + BorderColor =8355711 + ForeColor =8355711 + Name ="tbxPhotoType" + ConditionalFormat = Begin + 0x0100000098000000020000000100000000000000000000000d00000001000000 , + 0x3333ff00ffffff0001000000000000000e0000001b0000000100000000000000 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x5b004400450056005f004d004f00440045005d003d003100000000005b004400 , + 0x450056005f004d004f00440045005d003d00300000000000 + End + GridlineColor =10921638 + + LayoutCachedLeft =120 + LayoutCachedTop =3420 + LayoutCachedWidth =600 + LayoutCachedHeight =3660 + BorderThemeColorIndex =0 + BorderTint =50.0 + BorderShade =100.0 + ForeTint =50.0 + ConditionalFormat14 = Begin + 0x0100020000000100000000000000010000003333ff00ffffff000c0000005b00 , + 0x4400450056005f004d004f00440045005d003d00310000000000000000000000 , + 0x000000000000000000000001000000000000000100000000000000ffffff000c , + 0x0000005b004400450056005f004d004f00440045005d003d0030000000000000 , + 0x00000000000000000000000000000000 + End + End End End Begin FormFooter diff --git a/source/forms/SOPVersion.bas b/source/forms/SOPVersion.bas index 98c8825..19f292f 100644 --- a/source/forms/SOPVersion.bas +++ b/source/forms/SOPVersion.bas @@ -19,10 +19,10 @@ Begin Form Width =7560 DatasheetFontHeight =11 ItemSuffix =42 - Left =3825 - Top =3105 - Right =16980 - Bottom =14490 + Left =6615 + Top =2520 + Right =14175 + Bottom =13545 DatasheetGridlinesColor =14806254 OrderBy ="EffectiveDate DESC" RecSrcDt = Begin @@ -1043,7 +1043,9 @@ End Sub ' Parameters: - ' Returns: - ' Throws: none -' References: - +' References: +' Microsoft, January 19, 2017 +' https://docs.microsoft.com/en-us/sql/odbc/microsoft/column-name-limitations ' Source/date: Bonnie Campbell, January 19, 2017 - for NCPN tools ' Adapted: - ' Revisions: @@ -1061,7 +1063,7 @@ On Error GoTo Err_Handler ' ' retrieve SOP names ' retrieve SOP numbers - Dim rs As Recordset + Dim rs As DAO.Recordset Dim ary() As Variant ary = RetrieveTableColumnData("SOP_VersionTable") @@ -1071,23 +1073,26 @@ On Error GoTo Err_Handler 'prepare top level hdr - SOP Names 'prepare second level hdr - SOP #s - Dim ary2 As String + Dim ary2() As String ary2 = Split(ary(1), ",") - - + Dim rsColInfo As DAO.Recordset + Set rsColInfo = ary(0) Dim i As Integer Dim sop As String, sopnum As Integer -' For i = 0 To UBound(ary2) -' -' 'ary2(i)(0) -' + Dim aryRecord() As Variant + + For i = 0 To UBound(ary2) + +' Debug.Print ary2(i)(0) + ' 'create new record ' rs.AddNew ' -' aryRecord = Split(ary2(i)(0), "-") +' +' 'aryRecord() = IIF(InStr(ary2(i)Split(ary2(i)(0), "-") ' ' rs!EffectiveDate = aryRecord(0) ' rs!ColType = aryRecord(5) @@ -1097,11 +1102,83 @@ On Error GoTo Err_Handler ' ' 'add the new record ' rs.Update -' -' -' Next + + + Next + + 'create columns - EffectiveDate, 1-XXX SOP names + + Dim tdf As New DAO.TableDef + Dim aryCols() As String + Dim tbl As String + + aryCols = Split(ary(1), ",") + + 'generate table name + tbl = "SOP_Version_" & Format(Now, "YYYYmmdd_hhmmss") + + 'remove table if it already exists + Dim result As Boolean + If TableExists(tbl) Then _ + result = MsgBox("Version table already exists. Delete existing table: #" & tbl & " ?" _ + & vbCrLf & "This action cannot be undone.", vbYesNo, "Delete Existing SOP Version Table?") + + If result = vbYes Then CurrDb.TableDefs.Delete tbl + + With tdf + .Name = tbl + .Fields.Append .CreateField("EffectiveDate", dbDate) + + 'iterate through the SOPs (skip EffectiveDate = first record, aryCols(0)) + 'maximum column name length = 64 + 'column w/ any other characters other than letters, #s, or underscores + 'name must be delimited by enclosing it in back quotes (`) + For i = 1 To UBound(aryCols) + 'Debug.Print aryCols(i) & " " & Len(aryCols(i)) + + 'add only viable fields + If Len(Trim(aryCols(i))) > 0 Then + 'add the column + .Fields.Append .CreateField("" & Trim(aryCols(i)) & "", dbDouble) + End If + Next + + CurrDb.TableDefs.Append tdf + End With + + 'move table to RESULT TABLES group + SetNavGroup "RESULT TABLES", tbl, "table" + + Dim rsNew As DAO.Recordset + 'open a rs from the table + Set rsNew = CurrDb.OpenRecordset(tbl) + + 'iterate through SOP data + If Not (rsColInfo.BOF And rsColInfo.EOF) Then + rsColInfo.MoveFirst + Do Until rsColInfo.EOF = True + + rs.AddNew + + Debug.Print rsColInfo.Fields("Column") + Debug.Print rsColInfo.Fields("ColType") + Debug.Print rsColInfo.Fields("IsReqd") + Debug.Print rsColInfo.Fields("Length") + Debug.Print rsColInfo.Fields("AllowZLS") + + 'create columns + + 'EffectiveDate first + + rs.Update + + rsColInfo.MoveNext + Loop + End If + + Exit_Handler: Exit Sub Err_Handler: diff --git a/source/forms/SetObserverRecorder.bas b/source/forms/SetObserverRecorder.bas index 787851e..94914f1 100644 --- a/source/forms/SetObserverRecorder.bas +++ b/source/forms/SetObserverRecorder.bas @@ -20,10 +20,10 @@ Begin Form Width =7860 DatasheetFontHeight =11 ItemSuffix =42 - Left =4440 - Top =1455 - Right =12300 - Bottom =11235 + Left =3525 + Top =2490 + Right =12465 + Bottom =13875 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x747b49e35508e540 @@ -308,7 +308,7 @@ Begin Form BorderColor =8355711 ForeColor =6750156 Name ="lblRecordRefID" - Caption ="VegPlot ID # 6" + Caption ="refID" GridlineColor =10921638 LayoutCachedLeft =108 LayoutCachedTop =960 diff --git a/source/forms/VegPlot.bas b/source/forms/VegPlot.bas index 047fd14..c5f7ae9 100644 --- a/source/forms/VegPlot.bas +++ b/source/forms/VegPlot.bas @@ -20,10 +20,10 @@ Begin Form Width =7860 DatasheetFontHeight =11 ItemSuffix =99 - Left =4440 - Top =915 - Right =12300 - Bottom =12285 + Left =3225 + Top =2430 + Right =24735 + Bottom =15015 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x6efd080b49dfe440 @@ -2438,7 +2438,7 @@ Option Explicit ' BLC - 10/25/2016 - 1.04 - add CallingForm property & remove ButtonCaption, ' SelectedID, SelectedValue properties ' BLC - 1/9/2017 - 1.05 - added cbxEvent, observer/recorder, substrate cover % -' functionality +' ' BLC - 1/11/2017 - 1.06 - changed checkboxes (chk) to toggles (tgl) ' & converted -1/0 values to 1/0 for SQL clarity, ' changed event/transect display based on site/feature set @@ -2448,7 +2448,7 @@ Option Explicit ' BLC - 9/25/2017 - 1.08 - revise for NCPN_framework.XX classes ' BLC - 9/27/2017 - 1.09 - update to use Factory.NewClassXX() vs GetClass() ' BLC - 11/1/2017 - 1.10 - added chkCalibration, chkReplicate -' BLC - 11/7/2017 - 1.11 - fix cbxEvent column for date (cbxEvent_AfterUpdate()) +' BLC - 11/7/2017 - 1.11 - fix cbxEvent column fofunctionalityr date (cbxEvent_AfterUpdate()) ' BLC - 11/10/2017 - 1.12 - updated park specific controls, updated comment click, ' update to handle unset values using Ne() ' BLC - 11/11/2017 - 1.13 - update percent values to use SetTrace() @@ -2467,6 +2467,8 @@ Private m_Title As String Private m_Directions As String Private m_CallingForm As String +Private m_SaveOK As Boolean 'ok to save record (prevents bound form from immediately updating) + '--------------------- ' Event Declarations '--------------------- @@ -2696,8 +2698,10 @@ On Error GoTo Err_Handler Case "BLCA" 'feature level if set If Not TempVars("Feature") Is Nothing Then _ efilter = "s_events_by_feature" - cbxTransect.ColumnCount = 8 - cbxTransect.ColumnWidths = "0;0;0;0;2in;0;0;0;0" + cbxEvent.ColumnCount = 8 + cbxEvent.ColumnWidths = "0;0;0;0;2in;0;0;0;0" +' cbxTransect.ColumnCount = 8 +' cbxTransect.ColumnWidths = "0;0;0;0;2in;0;0;0;0" tfilter = "s_vegtransect_by_feature" cbxTransect.ColumnCount = 9 @@ -2738,6 +2742,8 @@ On Error GoTo Err_Handler 'defaults --> always on items '% sand & finer, water, litter, woody debris, modal sediment cover, '% standing dead, filamentous algae, beaver browse + tglBeaverBrowse.Visible = True + lblBeaverBrowse.Visible = True 'defaults --> turn off items lblTransect.Visible = False @@ -3651,80 +3657,99 @@ End Sub Private Sub btnSave_Click() On Error GoTo Err_Handler - 'Dim vp As New VegPlot - Dim vp As NCPN_framework.VegPlot - Set vp = Factory.NewVegPlot +' 'Dim vp As New VegPlot +' Dim vp As NCPN_framework.VegPlot +' Set vp = Factory.NewVegPlot +' +' With vp +' 'values passed into form +' .SiteID = TempVars("SiteID") +' .FeatureID = GetFeatureID(TempVars("ParkCode"), TempVars("FeatureID")) +' +' 'form values +' .EventID = cbxEvent +' .VegTransectID = Ne(Nz(cbxTransect, 0), 0) +' .PlotNumber = Ne(tbxNumber, 0) +' .PlotDistance = Ne(tbxDistance, 0) +' .ModalSedimentSizeID = cbxModalSedSize +' +' .PlotDensity = Ne(tbxPlotDensity, 0) +' +' 'pct values +' .PctFines = SetTrace(tbxPctFines, 0.5) +' .PctWater = SetTrace(tbxPctWater, 0.5) +' .PctLitter = SetTrace(tbxPctLitter, 0.5) +' .PctWoodyDebris = SetTrace(tbxPctWoodyDebris, 0.5) +' .PctFilamentousAlgae = SetTrace(tbxPctFA, 0.5) +' .PctStandingDead = SetTrace(tbxPctStandingDead, 0.5) +' .PctSocialTrails = SetTrace(tbxPctSocialTrails, 0.5) +' .PctModalSedimentSize = SetTrace(tbxPctMSS, 0.5) +' .WoodyCanopyPctCover = SetTrace(Ne(tbxPctWCC, 0), 0.5) +' .UnderstoryRootedPctCover = SetTrace(Ne(tbxPctURC, 0), 0.5) +' .AllRootedPctCover = SetTrace(Ne(tbxPctARC, 0), 0.5) +' +' 'chk/tgl values -> change Access -1 (true) to clearer 1 for use in SQL +' ' so value of 1 = has no canopy veg, 0 = has canopy veg etc. +' .NoCanopyVeg = IIf(tglNoCanopyVeg = -1, 1, 0) +' .NoRootedVeg = IIf(tglNoRootedVeg = -1, 1, 0) +' .NoIndicatorSpecies = IIf(tglNoIndicatorSpecies = -1, 1, 0) +' '.HasSocialTrails = IIf(tglHasSocialTrails = -1, 1, 0) 'replaced w/ PctSocialTrails +' .BeaverBrowse = IIf(tglBeaverBrowse = -1, 1, 0) +' +' .CalibrationPlot = IIf(chkCalibrationPlot = True, 1, 0) +' .ReplicatePlot = IIf(chkReplicatePlot = True, 1, 0) +' +' .ID = tbxID '0 if new, edit if > 0 +' .SaveToDb +' +' 'set the tbxID.value +' tbxID = .ID +' +' End With +' +' 'clear values & refresh display +' +' ReadyForSave +' +' PopulateForm Me, tbxID.Value +' +' If tbxID.Value > 0 Then +' 'highlight SetObserverRecorder button +' btnSetObserverRecorder.BorderColor = lngYellow +' lblMsg.ForeColor = lngYellow +' lblMsgIcon.Caption = StringFromCodepoint(uDoubleTriangleBlkR) +' lblMsg.Caption = "Don't forget to set observer && recorder!" +' +' 'enable buttons +' btnSubstrateCover.Enabled = True +' btnWCC.Enabled = True +' btnURC.Enabled = True +' btnARC.Enabled = True +' btnTaglines.Enabled = True +' End If +' 'refresh list +' Me.list.Requery +' +' Me.Requery - With vp - 'values passed into form - .SiteID = TempVars("SiteID") - .FeatureID = GetFeatureID(TempVars("ParkCode"), TempVars("FeatureID")) - - 'form values - .EventID = cbxEvent - .VegTransectID = Ne(cbxTransect, 0) - .PlotNumber = Ne(tbxNumber, 0) - .PlotDistance = Ne(tbxDistance, 0) - .ModalSedimentSizeID = cbxModalSedSize - - .PlotDensity = Ne(tbxPlotDensity, 0) - - 'pct values - .PctFines = SetTrace(tbxPctFines, 0.5) - .PctWater = SetTrace(tbxPctWater, 0.5) - .PctLitter = SetTrace(tbxPctLitter, 0.5) - .PctWoodyDebris = SetTrace(tbxPctWoodyDebris, 0.5) - .PctFilamentousAlgae = SetTrace(tbxPctFA, 0.5) - .PctStandingDead = SetTrace(tbxPctStandingDead, 0.5) - .PctSocialTrails = SetTrace(tbxPctSocialTrails, 0.5) - .PctModalSedimentSize = SetTrace(tbxPctMSS, 0.5) - .WoodyCanopyPctCover = SetTrace(Ne(tbxPctWCC, 0), 0.5) - .UnderstoryRootedPctCover = SetTrace(Ne(tbxPctURC, 0), 0.5) - .AllRootedPctCover = SetTrace(Ne(tbxPctARC, 0), 0.5) - - 'chk/tgl values -> change Access -1 (true) to clearer 1 for use in SQL - ' so value of 1 = has no canopy veg, 0 = has canopy veg etc. - .NoCanopyVeg = IIf(tglNoCanopyVeg = -1, 1, 0) - .NoRootedVeg = IIf(tglNoRootedVeg = -1, 1, 0) - .NoIndicatorSpecies = IIf(tglNoIndicatorSpecies = -1, 1, 0) - '.HasSocialTrails = IIf(tglHasSocialTrails = -1, 1, 0) 'replaced w/ PctSocialTrails - .BeaverBrowse = IIf(tglBeaverBrowse = -1, 1, 0) - - .CalibrationPlot = IIf(chkCalibrationPlot = True, 1, 0) - .ReplicatePlot = IIf(chkReplicatePlot = True, 1, 0) - - .ID = tbxID '0 if new, edit if > 0 - .SaveToDb + 'set enable btnSave_Click save + m_SaveOK = True - 'set the tbxID.value - tbxID = .ID - - End With - - 'clear values & refresh display + UpsertRecord Me - ReadyForSave + Me![list].Form.Requery - PopulateForm Me, tbxID.Value + 'revert to disable non-btnSave_Click save + m_SaveOK = False - If tbxID.Value > 0 Then - 'highlight SetObserverRecorder button - btnSetObserverRecorder.BorderColor = lngYellow - lblMsg.ForeColor = lngYellow - lblMsgIcon.Caption = StringFromCodepoint(uDoubleTriangleBlkR) - lblMsg.Caption = "Don't forget to set observer && recorder!" - - 'enable buttons - btnSubstrateCover.Enabled = True - btnWCC.Enabled = True - btnURC.Enabled = True - btnARC.Enabled = True - btnTaglines.Enabled = True - End If - 'refresh list - Me.list.Requery + 'clear fields + ClearForm Me - Me.Requery + 'clear control sources + cbxEvent.ControlSource = "" + 'cbxLocation.Value = "" + cbxTransect.ControlSource = "" + cbxModalSedSize.ControlSource = "" Exit_Handler: Exit Sub diff --git a/source/forms/VegPlotList.bas b/source/forms/VegPlotList.bas index 934cc1d..9540f16 100644 --- a/source/forms/VegPlotList.bas +++ b/source/forms/VegPlotList.bas @@ -9,6 +9,7 @@ Begin Form CloseButton = NotDefault DividingLines = NotDefault AllowAdditions = NotDefault + OrderByOn = NotDefault AllowEdits = NotDefault ScrollBars =2 ViewsAllowed =1 @@ -19,12 +20,13 @@ Begin Form GridY =24 Width =7560 DatasheetFontHeight =11 - ItemSuffix =32 - Left =1035 - Top =6330 - Right =8670 - Bottom =10695 + ItemSuffix =37 + Left =1065 + Top =6570 + Right =8445 + Bottom =10065 DatasheetGridlinesColor =14806254 + OrderBy ="ID DESC" RecSrcDt = Begin 0xe8a9c07c72c3e440 End @@ -43,7 +45,7 @@ Begin Form AllowPivotTableView =0 AllowPivotChartView =0 AllowPivotChartView =0 - FilterOnLoad =0 + FilterOnLoad =255 ShowPageMargins =0 DisplayOnSharePointSite =1 AllowLayoutView =0 @@ -172,26 +174,27 @@ Begin Form End Begin Label OverlapFlags =85 - Left =1560 + Left =1200 Top =1020 - Width =1245 + Width =1860 Height =315 FontWeight =500 BorderColor =8355711 ForeColor =16777215 - Name ="lblNumber" - Caption ="Plot #" + Name ="lblPlotNumDist" + Caption ="Plot #/Distance (m)" + OnClick ="[Event Procedure]" GridlineColor =10921638 - LayoutCachedLeft =1560 + LayoutCachedLeft =1200 LayoutCachedTop =1020 - LayoutCachedWidth =2805 + LayoutCachedWidth =3060 LayoutCachedHeight =1335 ForeThemeColorIndex =-1 ForeTint =100.0 End Begin Label OverlapFlags =85 - Left =960 + Left =840 Top =1020 Width =270 Height =315 @@ -200,36 +203,39 @@ Begin Form ForeColor =16777215 Name ="lblHdrID" Caption ="ID" + OnClick ="[Event Procedure]" GridlineColor =10921638 - LayoutCachedLeft =960 + LayoutCachedLeft =840 LayoutCachedTop =1020 - LayoutCachedWidth =1230 + LayoutCachedWidth =1110 LayoutCachedHeight =1335 ForeThemeColorIndex =-1 ForeTint =100.0 End Begin Label OverlapFlags =85 - Left =2940 + Left =3120 Top =1020 Width =1245 Height =315 FontWeight =500 BorderColor =8355711 ForeColor =16777215 - Name ="lblDistance" - Caption ="Distance (m)" + Name ="lblPctMSS" + Caption ="MSS % Cover" + OnClick ="[Event Procedure]" GridlineColor =10921638 - LayoutCachedLeft =2940 + LayoutCachedLeft =3120 LayoutCachedTop =1020 - LayoutCachedWidth =4185 + LayoutCachedWidth =4365 LayoutCachedHeight =1335 ForeThemeColorIndex =-1 ForeTint =100.0 End Begin Label OverlapFlags =85 - Left =4320 + TextAlign =2 + Left =4500 Top =1020 Width =1245 Height =315 @@ -237,11 +243,12 @@ Begin Form BorderColor =8355711 ForeColor =16777215 Name ="lblModalSedSize" - Caption ="Modal Sediment Size" + Caption ="MSS Class" + OnClick ="[Event Procedure]" GridlineColor =10921638 - LayoutCachedLeft =4320 + LayoutCachedLeft =4500 LayoutCachedTop =1020 - LayoutCachedWidth =5565 + LayoutCachedWidth =5745 LayoutCachedHeight =1335 ForeThemeColorIndex =-1 ForeTint =100.0 @@ -256,8 +263,108 @@ Begin Form AlternateBackShade =95.0 BackThemeColorIndex =1 Begin + Begin TextBox + Visible = NotDefault + Enabled = NotDefault + OldBorderStyle =0 + OverlapFlags =93 + TextAlign =2 + BackStyle =0 + IMESentenceMode =3 + Left =1080 + Width =1560 + Height =300 + TabIndex =9 + BorderColor =10921638 + ForeColor =4138256 + Name ="tbxReplicatePlot" + ControlSource ="ReplicatePlot" + GridlineColor =10921638 + + LayoutCachedLeft =1080 + LayoutCachedWidth =2640 + LayoutCachedHeight =300 + ForeThemeColorIndex =2 + ForeTint =100.0 + ForeShade =50.0 + End + Begin TextBox + Visible = NotDefault + Enabled = NotDefault + OldBorderStyle =0 + OverlapFlags =93 + TextAlign =2 + BackStyle =0 + IMESentenceMode =3 + Left =2700 + Width =1560 + Height =300 + TabIndex =8 + BorderColor =10921638 + ForeColor =4138256 + Name ="tbxCalibrationPlot" + ControlSource ="CalibrationPlot" + GridlineColor =10921638 + + LayoutCachedLeft =2700 + LayoutCachedWidth =4260 + LayoutCachedHeight =300 + ForeThemeColorIndex =2 + ForeTint =100.0 + ForeShade =50.0 + End + Begin TextBox + Visible = NotDefault + Enabled = NotDefault + OldBorderStyle =0 + OverlapFlags =93 + TextAlign =2 + BackStyle =0 + IMESentenceMode =3 + Left =5940 + Width =1560 + Height =300 + TabIndex =5 + BorderColor =10921638 + ForeColor =4138256 + Name ="tbxDistance" + ControlSource ="PlotDistance_m" + GridlineColor =10921638 + + LayoutCachedLeft =5940 + LayoutCachedWidth =7500 + LayoutCachedHeight =300 + ForeThemeColorIndex =2 + ForeTint =100.0 + ForeShade =50.0 + End + Begin TextBox + Visible = NotDefault + Enabled = NotDefault + OldBorderStyle =0 + OverlapFlags =93 + TextAlign =2 + BackStyle =0 + IMESentenceMode =3 + Left =4320 + Width =1560 + Height =300 + TabIndex =3 + BorderColor =10921638 + ForeColor =4138256 + Name ="tbxNumber" + ControlSource ="PlotNumber" + GridlineColor =10921638 + + LayoutCachedLeft =4320 + LayoutCachedWidth =5880 + LayoutCachedHeight =300 + ForeThemeColorIndex =2 + ForeTint =100.0 + ForeShade =50.0 + End Begin CommandButton - OverlapFlags =85 + OverlapFlags =247 Left =6000 Width =720 ForeColor =4210752 @@ -320,7 +427,7 @@ Begin Form End Begin TextBox OldBorderStyle =0 - OverlapFlags =85 + OverlapFlags =93 BackStyle =0 IMESentenceMode =3 Left =120 @@ -345,7 +452,7 @@ Begin Form ForeTint =50.0 End Begin CommandButton - OverlapFlags =85 + OverlapFlags =247 TextFontFamily =2 Left =6780 Width =720 @@ -380,73 +487,127 @@ Begin Form Begin TextBox Enabled = NotDefault OldBorderStyle =0 - OverlapFlags =93 + OverlapFlags =247 TextAlign =2 BackStyle =0 IMESentenceMode =3 - Left =1440 - Top =15 - Width =1560 - Height =300 - TabIndex =3 + Left =720 + Width =480 + Height =315 + TabIndex =4 BorderColor =10921638 - ForeColor =4138256 - Name ="tbxNumber" - ControlSource ="PlotNumber" + ForeColor =4210752 + Name ="tbxID" + ControlSource ="ID" + ConditionalFormat = Begin + 0x01000000e0000000020000000100000000000000000000002000000001000000 , + 0xff990000ffffff000100000000000000210000003f0000000100000022b14c00 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x49004900660028005b00740062007800430061006c0069006200720061007400 , + 0x69006f006e0050006c006f0074005d003d0031002c0031002c00300029000000 , + 0x000049004900660028005b007400620078005200650070006c00690063006100 , + 0x7400650050006c006f0074005d003d0031002c0031002c003000290000000000 + End GridlineColor =10921638 - LayoutCachedLeft =1440 - LayoutCachedTop =15 - LayoutCachedWidth =3000 + LayoutCachedLeft =720 + LayoutCachedWidth =1200 LayoutCachedHeight =315 - ForeThemeColorIndex =2 - ForeTint =100.0 - ForeShade =50.0 + ConditionalFormat14 = Begin + 0x010002000000010000000000000001000000ff990000ffffff001f0000004900 , + 0x4900660028005b00740062007800430061006c00690062007200610074006900 , + 0x6f006e0050006c006f0074005d003d0031002c0031002c003000290000000000 , + 0x000000000000000000000000000000000001000000000000000100000022b14c , + 0x00ffffff001d00000049004900660028005b007400620078005200650070006c , + 0x006900630061007400650050006c006f0074005d003d0031002c0031002c0030 , + 0x002900000000000000000000000000000000000000000000 + End End Begin TextBox Enabled = NotDefault OldBorderStyle =0 - OverlapFlags =85 + OverlapFlags =247 TextAlign =2 BackStyle =0 IMESentenceMode =3 - Left =900 - Width =480 - Height =315 - TabIndex =4 + Left =4200 + Width =1560 + Height =300 + FontSize =9 + TabIndex =6 BorderColor =10921638 - ForeColor =4210752 - Name ="tbxID" - ControlSource ="ID" + ForeColor =4138256 + Name ="tbxModalSedSize" + ControlSource ="ModalSedimentSize_ID" + ConditionalFormat = Begin + 0x01000000e0000000020000000100000000000000000000002000000001000000 , + 0xff990000ffffff000100000000000000210000003f0000000100000022b14c00 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x49004900660028005b00740062007800430061006c0069006200720061007400 , + 0x69006f006e0050006c006f0074005d003d0031002c0031002c00300029000000 , + 0x000049004900660028005b007400620078005200650070006c00690063006100 , + 0x7400650050006c006f0074005d003d0031002c0031002c003000290000000000 + End GridlineColor =10921638 - LayoutCachedLeft =900 - LayoutCachedWidth =1380 - LayoutCachedHeight =315 + LayoutCachedLeft =4200 + LayoutCachedWidth =5760 + LayoutCachedHeight =300 + ForeThemeColorIndex =2 + ForeTint =100.0 + ForeShade =50.0 + ConditionalFormat14 = Begin + 0x010002000000010000000000000001000000ff990000ffffff001f0000004900 , + 0x4900660028005b00740062007800430061006c00690062007200610074006900 , + 0x6f006e0050006c006f0074005d003d0031002c0031002c003000290000000000 , + 0x000000000000000000000000000000000001000000000000000100000022b14c , + 0x00ffffff001d00000049004900660028005b007400620078005200650070006c , + 0x006900630061007400650050006c006f0074005d003d0031002c0031002c0030 , + 0x002900000000000000000000000000000000000000000000 + End End Begin TextBox Enabled = NotDefault OldBorderStyle =0 - OverlapFlags =255 + OverlapFlags =247 TextAlign =2 BackStyle =0 IMESentenceMode =3 - Left =2820 + Left =1440 Width =1560 Height =300 - TabIndex =5 + TabIndex =7 BorderColor =10921638 ForeColor =4138256 - Name ="tbxDistance" - ControlSource ="PlotDistance_m" + Name ="tbxPlotNumDist" + ControlSource ="=IIf([tbxCalibrationPlot]=1,\"C\",\"\") & IIf([tbxReplicatePlot]=1,\"R\",\"\") &" + " IIf(TempVars(\"ParkCode\")=\"DINO\",[tbxNumber],[tbxDistance])" + ConditionalFormat = Begin + 0x01000000e0000000020000000100000000000000000000002000000001000000 , + 0xff990000ffffff000100000000000000210000003f0000000100000022b14c00 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x49004900660028005b00740062007800430061006c0069006200720061007400 , + 0x69006f006e0050006c006f0074005d003d0031002c0031002c00300029000000 , + 0x000049004900660028005b007400620078005200650070006c00690063006100 , + 0x7400650050006c006f0074005d003d0031002c0031002c003000290000000000 + End GridlineColor =10921638 - LayoutCachedLeft =2820 - LayoutCachedWidth =4380 + LayoutCachedLeft =1440 + LayoutCachedWidth =3000 LayoutCachedHeight =300 ForeThemeColorIndex =2 ForeTint =100.0 ForeShade =50.0 + ConditionalFormat14 = Begin + 0x010002000000010000000000000001000000ff990000ffffff001f0000004900 , + 0x4900660028005b00740062007800430061006c00690062007200610074006900 , + 0x6f006e0050006c006f0074005d003d0031002c0031002c003000290000000000 , + 0x000000000000000000000000000000000001000000000000000100000022b14c , + 0x00ffffff001d00000049004900660028005b007400620078005200650070006c , + 0x006900630061007400650050006c006f0074005d003d0031002c0031002c0030 , + 0x002900000000000000000000000000000000000000000000 + End End Begin TextBox Enabled = NotDefault @@ -455,22 +616,40 @@ Begin Form TextAlign =2 BackStyle =0 IMESentenceMode =3 - Left =4080 - Width =1560 + Left =3120 + Width =840 Height =300 - TabIndex =6 + TabIndex =10 BorderColor =10921638 ForeColor =4138256 - Name ="tbxModalSedSize" - ControlSource ="ModalSedimentSize_ID" + Name ="tbxPctMSS" + ControlSource ="PctModalSedimentSize" + ConditionalFormat = Begin + 0x01000000e0000000020000000100000000000000000000002000000001000000 , + 0xff990000ffffff000100000000000000210000003f0000000100000022b14c00 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x49004900660028005b00740062007800430061006c0069006200720061007400 , + 0x69006f006e0050006c006f0074005d003d0031002c0031002c00300029000000 , + 0x000049004900660028005b007400620078005200650070006c00690063006100 , + 0x7400650050006c006f0074005d003d0031002c0031002c003000290000000000 + End GridlineColor =10921638 - LayoutCachedLeft =4080 - LayoutCachedWidth =5640 + LayoutCachedLeft =3120 + LayoutCachedWidth =3960 LayoutCachedHeight =300 ForeThemeColorIndex =2 ForeTint =100.0 ForeShade =50.0 + ConditionalFormat14 = Begin + 0x010002000000010000000000000001000000ff990000ffffff001f0000004900 , + 0x4900660028005b00740062007800430061006c00690062007200610074006900 , + 0x6f006e0050006c006f0074005d003d0031002c0031002c003000290000000000 , + 0x000000000000000000000000000000000001000000000000000100000022b14c , + 0x00ffffff001d00000049004900660028005b007400620078005200650070006c , + 0x006900630061007400650050006c006f0074005d003d0031002c0031002c0030 , + 0x002900000000000000000000000000000000000000000000 + End End End End @@ -494,7 +673,7 @@ Option Explicit ' ================================= ' Form: VegPlotList ' Level: Application form -' Version: 1.02 +' Version: 1.03 ' Basis: Dropdown form ' ' Description: List form object related properties, events, functions & procedures for UI display @@ -504,6 +683,7 @@ Option Explicit ' Revisions: BLC - 5/31/2016 - 1.00 - initial version ' BLC - 10/16/2017 - 1.01 - revised to use tbxID vs. ID on delete ' BLC - 11/10/2017 - 1.02 - fix so passes form Me.Parent.Form vs. Me.Parent (btnEdit_Click()) +' BLC - 12/7/2017 - 1.03 - added sorting by header ' ================================= '--------------------- @@ -696,6 +876,134 @@ Err_Handler: Resume Exit_Handler End Sub +' --------------------------------- +' Sub: lblHdrID_Click +' Description: lbl click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: +' pere_de_chipstic, August 5, 2012 +' http://www.utteraccess.com/forum/Sort-Continuous-Form-Hea-t1991553.html +' Source/date: Bonnie Campbell, September 13, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/7/2016 - initial version +' --------------------------------- +Private Sub lblHdrID_Click() +On Error GoTo Err_Handler + + 'set the sort + SortListForm Me, Me.lblHdrID + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - lblHdrID_Click[VegPlotList form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: lblPctMSS_Click +' Description: lbl click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: +' pere_de_chipstic, August 5, 2012 +' http://www.utteraccess.com/forum/Sort-Continuous-Form-Hea-t1991553.html +' Source/date: Bonnie Campbell, September 13, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/7/2016 - initial version +' --------------------------------- +Private Sub lblPctMSS_Click() +On Error GoTo Err_Handler + + 'set the sort + SortListForm Me, Me.lblPctMSS + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - lblPctMSS_Click[VegPlotList form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: lblModalSedSize_Click +' Description: lbl click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: +' pere_de_chipstic, August 5, 2012 +' http://www.utteraccess.com/forum/Sort-Continuous-Form-Hea-t1991553.html +' Source/date: Bonnie Campbell, September 13, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/7/2016 - initial version +' --------------------------------- +Private Sub lblModalSedSize_Click() +On Error GoTo Err_Handler + + 'set the sort + SortListForm Me, Me.lblModalSedSize + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - lblModalSedSize_Click[VegPlotList form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: lblPlotNumDist_Click +' Description: lbl click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: +' pere_de_chipstic, August 5, 2012 +' http://www.utteraccess.com/forum/Sort-Continuous-Form-Hea-t1991553.html +' Source/date: Bonnie Campbell, September 13, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/7/2016 - initial version +' --------------------------------- +Private Sub lblPlotNumDist_Click() +On Error GoTo Err_Handler + + 'set the sort + SortListForm Me, Me.lblPlotNumDist + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - lblPlotNumDist_Click[VegPlotList form])" + End Select + Resume Exit_Handler +End Sub + ' --------------------------------- ' Sub: btnEdit_Click ' Description: Enter button click actions diff --git a/source/forms/_frm_Master_Species.bas b/source/forms/_frm_Master_Species.bas deleted file mode 100644 index 9d1679f..0000000 --- a/source/forms/_frm_Master_Species.bas +++ /dev/null @@ -1,1465 +0,0 @@ -Version =20 -VersionRequired =20 -Begin Form - PopUp = NotDefault - RecordSelectors = NotDefault - AutoCenter = NotDefault - NavigationButtons = NotDefault - AllowDeletions = NotDefault - DividingLines = NotDefault - AllowAdditions = NotDefault - DefaultView =0 - ScrollBars =0 - TabularFamily =127 - PictureAlignment =2 - DatasheetGridlinesBehavior =3 - GridX =24 - GridY =24 - Width =11580 - DatasheetFontHeight =9 - ItemSuffix =162 - Left =3720 - Top =2340 - Right =11820 - Bottom =8055 - DatasheetGridlinesColor =12632256 - RecSrcDt = Begin - 0x748529458d1ee340 - End - RecordSource ="tlu_NCPN_Plants" - Caption ="Master Species Lookup" - OnOpen ="[Event Procedure]" - DatasheetFontName ="Arial" - PrtMip = Begin - 0xa0050000a0050000a0050000a005000000000000201c0000e010000001000000 , - 0x010000006801000000000000a10700000100000001000000 - End - OnLoad ="[Event Procedure]" - FilterOnLoad =0 - AllowLayoutView =0 - DatasheetGridlinesColor12 =12632256 - Begin - Begin Label - BackStyle =0 - FontName ="Tahoma" - End - Begin Line - BorderLineStyle =0 - End - Begin CommandButton - FontSize =8 - FontWeight =400 - ForeColor =-2147483630 - FontName ="Tahoma" - BorderLineStyle =0 - End - Begin OptionButton - SpecialEffect =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - End - Begin CheckBox - SpecialEffect =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - End - Begin OptionGroup - SpecialEffect =3 - BorderLineStyle =0 - End - Begin TextBox - FELineBreak = NotDefault - SpecialEffect =2 - OldBorderStyle =0 - BorderLineStyle =0 - FontName ="Tahoma" - AsianLineBreak =255 - End - Begin ComboBox - SpecialEffect =2 - BorderLineStyle =0 - FontName ="Tahoma" - End - Begin Section - Height =7200 - BackColor =-2147483633 - Name ="Detail" - Begin - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =4080 - Top =120 - Width =3780 - Height =420 - FontSize =14 - FontWeight =700 - Name ="Label0" - Caption ="Master Species Lookup" - End - Begin ComboBox - ColumnHeads = NotDefault - LimitToList = NotDefault - OverlapFlags =93 - IMESentenceMode =3 - ColumnCount =11 - ListRows =30 - ListWidth =14400 - Left =180 - Top =900 - Width =2040 - BoundColumn =1 - Name ="Select_Code" - RowSourceType ="Table/Query" - ColumnWidths ="1;1440;1152;1872;1728;864;1872;864;1440;864;1872" - AfterUpdate ="[Event Procedure]" - - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =93 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =2220 - Top =1440 - Width =3600 - TabIndex =1 - Name ="Master_Species" - ControlSource ="Master_Species" - - Begin - Begin Label - OverlapFlags =85 - Left =180 - Top =1440 - Width =1980 - Height =240 - FontWeight =700 - Name ="Label4" - Caption ="Master Species (ITIS)" - End - End - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =85 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =7200 - Top =1440 - Width =2040 - TabIndex =2 - Name ="Master_Family" - ControlSource ="Master_Family" - - Begin - Begin Label - OverlapFlags =87 - TextAlign =3 - Left =5820 - Top =1440 - Width =1320 - Height =240 - FontWeight =700 - Name ="Label6" - Caption ="Master Family" - End - End - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =85 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =2280 - Top =1860 - Width =2940 - TabIndex =3 - Name ="Master_Common_Name" - ControlSource ="Master_Common_Name" - - Begin - Begin Label - OverlapFlags =85 - Left =180 - Top =1860 - Width =2040 - Height =240 - FontWeight =700 - Name ="Label8" - Caption ="Master Common Name" - End - End - End - Begin Label - OverlapFlags =87 - Left =180 - Top =660 - Width =2040 - Height =240 - FontWeight =700 - Name ="Combo_Caption" - Caption ="Master PLANTS Code" - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =93 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =7200 - Top =1860 - Width =3660 - Height =600 - TabIndex =4 - Name ="Add_Synonyms" - ControlSource ="Add_Synonyms" - - Begin - Begin Label - OverlapFlags =85 - TextAlign =3 - Left =5280 - Top =1860 - Width =1860 - Height =240 - FontWeight =700 - Name ="Label11" - Caption ="Additional Synonyms" - End - End - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =87 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =1860 - Top =2460 - Width =9000 - Height =420 - TabIndex =5 - Name ="Taxonomic_Notes" - ControlSource ="Taxonomic_Notes" - - Begin - Begin Label - OverlapFlags =85 - Left =180 - Top =2460 - Width =1620 - Height =240 - FontWeight =700 - Name ="Label13" - Caption ="Taxonomic Notes:" - End - End - End - Begin Label - OverlapFlags =85 - Left =240 - Top =3420 - Width =480 - Height =240 - FontWeight =700 - Name ="Label14" - Caption ="Utah" - End - Begin Label - OverlapFlags =85 - Left =240 - Top =3840 - Width =840 - Height =240 - FontWeight =700 - Name ="Label16" - Caption ="Colorado" - End - Begin Label - OverlapFlags =85 - Left =240 - Top =4260 - Width =900 - Height =240 - FontWeight =700 - Name ="Label17" - Caption ="Wyoming" - End - Begin Line - OverlapFlags =85 - SpecialEffect =5 - Left =60 - Top =3000 - Width =11520 - Name ="Line18" - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =85 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =1320 - Top =3420 - Width =960 - TabIndex =6 - Name ="Utah_PLANT_Code" - ControlSource ="Utah_PLANT_Code" - - Begin - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =1260 - Top =3120 - Width =1080 - Height =240 - FontWeight =700 - Name ="Label20" - Caption ="PLANT Code" - End - End - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =85 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =1320 - Top =3840 - Width =959 - TabIndex =7 - Name ="Co_PLANT_Code" - ControlSource ="Co_PLANT_Code" - - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =85 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =1320 - Top =4260 - Width =959 - TabIndex =8 - Name ="Wy_PLANT_code" - ControlSource ="Wy_PLANT_code" - - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =93 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =2460 - Top =3420 - Width =3660 - TabIndex =9 - Name ="Utah_Species" - ControlSource ="Utah_Species" - - Begin - Begin Label - OverlapFlags =85 - TextAlign =1 - Left =2460 - Top =3120 - Width =720 - Height =240 - FontWeight =700 - Name ="Label25" - Caption ="Species" - End - End - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =93 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =2460 - Top =3840 - Width =3660 - TabIndex =10 - Name ="Co_Species" - ControlSource ="Co_Species" - - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =93 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =2460 - Top =4260 - Width =3660 - TabIndex =11 - Name ="Wy_Species" - ControlSource ="Wy_Species" - - End - Begin Label - OverlapFlags =87 - TextAlign =1 - Left =6120 - Top =3840 - Width =1980 - Height =240 - Name ="Label29" - Caption ="(Weber && Wittmann 2001)" - End - Begin Label - OverlapFlags =87 - Left =6120 - Top =3420 - Width =1380 - Height =240 - Name ="Label30" - Caption ="(Welsh et al 2003)" - End - Begin Label - OverlapFlags =87 - Left =6120 - Top =4260 - Width =960 - Height =240 - Name ="Label31" - Caption ="(Dorn 2001)" - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =85 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =8820 - Top =3420 - Width =1800 - TabIndex =12 - Name ="UT_Family" - ControlSource ="UT_Family" - StatusBarText ="Utah Family" - - Begin - Begin Label - OverlapFlags =85 - Left =8820 - Top =3120 - Width =660 - Height =240 - FontWeight =700 - Name ="Label34" - Caption ="Family" - End - End - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =85 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =8820 - Top =3840 - Width =1800 - TabIndex =13 - Name ="CO_Family" - ControlSource ="CO_Family" - StatusBarText ="Colorado Family" - - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =85 - TextAlign =1 - BackStyle =0 - IMESentenceMode =3 - Left =8820 - Top =4260 - Width =1800 - TabIndex =14 - Name ="WY_Family" - ControlSource ="WY_Family" - StatusBarText ="Wyoming Family" - - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =600 - Top =5340 - Width =240 - Height =180 - TabIndex =15 - Name ="Check91" - ControlSource ="=IIf([ARCH]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =480 - Top =5040 - Width =495 - Height =240 - Name ="Label92" - Caption ="ARCH" - End - End - End - Begin TextBox - Visible = NotDefault - OverlapFlags =93 - IMESentenceMode =3 - Left =7920 - Top =60 - Width =420 - TabIndex =16 - Name ="ARCH" - ControlSource ="ARCH" - StatusBarText ="Park presence descriptor for ARCH" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =8340 - Top =60 - Width =420 - TabIndex =17 - Name ="BLCA" - ControlSource ="BLCA" - StatusBarText ="Park presence descriptor for BLCA" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =8760 - Top =60 - Width =420 - TabIndex =18 - Name ="BRCA" - ControlSource ="BRCA" - StatusBarText ="Park presence descriptor for BRCA" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =9180 - Top =60 - Width =420 - TabIndex =19 - Name ="CANY" - ControlSource ="CANY" - StatusBarText ="Park presence descriptor for CANY" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =9600 - Top =60 - Width =420 - TabIndex =20 - Name ="CARE" - ControlSource ="CARE" - StatusBarText ="Park presence descriptor for CARE" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =10020 - Top =60 - Width =420 - TabIndex =21 - Name ="CEBR" - ControlSource ="CEBR" - StatusBarText ="Park presence descriptor for CEBR" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =10440 - Top =60 - Width =420 - TabIndex =22 - Name ="COLM" - ControlSource ="COLM" - StatusBarText ="Park presence descriptor for COLM" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =10860 - Top =60 - Width =420 - TabIndex =23 - Name ="CURE" - ControlSource ="CURE" - StatusBarText ="Park presence descriptor for CURE" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =8340 - Top =300 - Width =420 - TabIndex =24 - Name ="FOBU" - ControlSource ="FOBU" - StatusBarText ="Park presence descriptor for FOBU" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =8760 - Top =300 - Width =420 - TabIndex =25 - Name ="GOSP" - ControlSource ="GOSP" - StatusBarText ="Park presence descriptor for GOSP" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =9600 - Top =300 - Width =420 - TabIndex =26 - Name ="NABR" - ControlSource ="NABR" - StatusBarText ="Park presence descriptor for NABR" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =10020 - Top =300 - Width =420 - TabIndex =27 - Name ="PISP" - ControlSource ="PISP" - StatusBarText ="Park presence descriptor for PISP" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =10440 - Top =300 - Width =420 - TabIndex =28 - Name ="TICA" - ControlSource ="TICA" - StatusBarText ="Park presence descriptor for TICA" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =87 - IMESentenceMode =3 - Left =10860 - Top =300 - Width =420 - TabIndex =29 - Name ="ZION" - ControlSource ="ZION" - StatusBarText ="Park presence descriptor for ZION" - - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =5160 - Top =4740 - Width =1500 - Height =240 - FontWeight =700 - Name ="Label111" - Caption ="Present in Parks" - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =1260 - Top =5340 - Width =240 - Height =180 - TabIndex =30 - Name ="Check113" - ControlSource ="=IIf([BLCA]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =1140 - Top =5040 - Width =495 - Height =240 - Name ="Label114" - Caption ="BLCA" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =1920 - Top =5340 - Width =240 - Height =180 - TabIndex =31 - Name ="Check115" - ControlSource ="=IIf([BRCA]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =1800 - Top =5040 - Width =495 - Height =240 - Name ="Label116" - Caption ="BRCA" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =2580 - Top =5340 - Width =240 - Height =180 - TabIndex =32 - Name ="Check117" - ControlSource ="=IIf([CANY]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =2460 - Top =5040 - Width =495 - Height =240 - Name ="Label118" - Caption ="CANY" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =3240 - Top =5340 - Width =240 - Height =180 - TabIndex =33 - Name ="Check119" - ControlSource ="=IIf([CARE]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =3120 - Top =5040 - Width =495 - Height =240 - Name ="Label120" - Caption ="CARE" - End - End - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =7920 - Top =300 - Width =420 - TabIndex =34 - Name ="DINO(UT)" - ControlSource ="DINO(UT)" - StatusBarText ="Park presence descriptor for DINO - Utah" - EventProcPrefix ="DINO_UT_" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =7920 - Top =540 - Width =420 - TabIndex =35 - Name ="DINO(CO)" - ControlSource ="DINO(CO)" - StatusBarText ="Park presence descriptor for DINO - Colorado" - EventProcPrefix ="DINO_CO_" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =95 - IMESentenceMode =3 - Left =9180 - Top =300 - Width =420 - TabIndex =36 - Name ="HOVE(UT)" - ControlSource ="HOVE(UT)" - StatusBarText ="Park presence descriptor for HOVE - Utah" - EventProcPrefix ="HOVE_UT_" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =87 - IMESentenceMode =3 - Left =9180 - Top =540 - Width =420 - TabIndex =37 - Name ="HOVE(CO)" - ControlSource ="HOVE(CO)" - StatusBarText ="Park presence descriptor for HOVE - Colorado" - EventProcPrefix ="HOVE_CO_" - - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =3900 - Top =5340 - Width =240 - Height =180 - TabIndex =38 - Name ="Check125" - ControlSource ="=IIf([CEBR]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =3780 - Top =5040 - Width =495 - Height =240 - Name ="Label126" - Caption ="CEBR" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =4560 - Top =5340 - Width =240 - Height =180 - TabIndex =39 - Name ="Check127" - ControlSource ="=IIf([COLM]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =4440 - Top =5040 - Width =495 - Height =240 - Name ="Label128" - Caption ="COLM" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =5220 - Top =5340 - Width =240 - Height =180 - TabIndex =40 - Name ="Check129" - ControlSource ="=IIf([CURE]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =5100 - Top =5040 - Width =495 - Height =240 - Name ="Label130" - Caption ="CURE" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =5880 - Top =5340 - Width =240 - Height =180 - TabIndex =41 - Name ="Check131" - ControlSource ="=IIf(([DINO(UT)]=\"Present\") Or ([DINO(CO)]=\"Present\"),-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =5760 - Top =5040 - Width =495 - Height =240 - Name ="Label132" - Caption ="DINO" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =6540 - Top =5340 - Width =240 - Height =180 - TabIndex =42 - Name ="Check133" - ControlSource ="=IIf([FOBU]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =6420 - Top =5040 - Width =495 - Height =240 - Name ="Label134" - Caption ="FOBU" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =7200 - Top =5340 - Width =240 - Height =180 - TabIndex =43 - Name ="Check135" - ControlSource ="=IIf([GOSP]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =7080 - Top =5040 - Width =495 - Height =240 - Name ="Label136" - Caption ="GOSP" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =7860 - Top =5340 - Width =240 - Height =180 - TabIndex =44 - Name ="Check137" - ControlSource ="=IIf(([HOVE(UT)]=\"Present\") Or ([HOVE(CO)]=\"Present\"),-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =7740 - Top =5040 - Width =495 - Height =240 - Name ="Label138" - Caption ="HOVE" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =8520 - Top =5340 - Width =240 - Height =180 - TabIndex =45 - Name ="Check139" - ControlSource ="=IIf([NABR]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =8400 - Top =5040 - Width =495 - Height =240 - Name ="Label140" - Caption ="NABR" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =9180 - Top =5340 - Width =240 - Height =180 - TabIndex =46 - Name ="Check141" - ControlSource ="=IIf([PISP]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =9060 - Top =5040 - Width =495 - Height =240 - Name ="Label142" - Caption ="PISP" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =9840 - Top =5340 - Width =240 - Height =180 - TabIndex =47 - Name ="Check143" - ControlSource ="=IIf([TICA]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =9720 - Top =5040 - Width =495 - Height =240 - Name ="Label144" - Caption ="TICA" - End - End - End - Begin CheckBox - Enabled = NotDefault - Locked = NotDefault - OverlapFlags =85 - Left =10500 - Top =5340 - Width =240 - Height =180 - TabIndex =48 - Name ="Check145" - ControlSource ="=IIf([ZION]=\"Present\",-1,0)" - - Begin - Begin Label - OverlapFlags =85 - Left =10380 - Top =5040 - Width =495 - Height =240 - Name ="Label146" - Caption ="ZION" - End - End - End - Begin Line - OverlapFlags =85 - SpecialEffect =5 - Left =60 - Top =4620 - Width =11460 - Name ="Line147" - End - Begin CommandButton - OverlapFlags =85 - Left =5220 - Top =6060 - Width =1140 - Height =405 - TabIndex =49 - Name ="ButtonClose" - Caption ="Close Form" - OnClick ="[Event Procedure]" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin OptionGroup - SpecialEffect =2 - OverlapFlags =247 - Left =2400 - Top =720 - Width =5706 - Height =478 - TabIndex =50 - Name ="Sort_Options" - AfterUpdate ="[Event Procedure]" - DefaultValue ="1" - - Begin - Begin Label - BackStyle =1 - OverlapFlags =247 - Left =2520 - Top =600 - Width =1530 - Height =240 - BackColor =-2147483633 - Name ="Label150" - Caption ="Sort List by MASTER" - End - Begin OptionButton - OverlapFlags =119 - Left =2580 - Top =928 - OptionValue =1 - Name ="Option152" - - Begin - Begin Label - OverlapFlags =247 - Left =2810 - Top =900 - Width =960 - Height =240 - Name ="Label153" - Caption ="PLANT Code" - End - End - End - Begin OptionButton - OverlapFlags =119 - Left =3960 - Top =928 - OptionValue =2 - Name ="Option154" - - Begin - Begin Label - OverlapFlags =247 - Left =4190 - Top =900 - Width =615 - Height =240 - Name ="Label155" - Caption ="Species" - End - End - End - Begin OptionButton - OverlapFlags =119 - Left =4980 - Top =928 - OptionValue =3 - Name ="Option156" - - Begin - Begin Label - OverlapFlags =247 - Left =5210 - Top =900 - Width =1125 - Height =240 - Name ="Label157" - Caption ="Family-Species" - End - End - End - Begin OptionButton - OverlapFlags =119 - Left =6480 - Top =928 - OptionValue =4 - Name ="Option158" - - Begin - Begin Label - OverlapFlags =247 - Left =6710 - Top =900 - Width =1140 - Height =240 - Name ="Label159" - Caption ="Common Name" - End - End - End - End - End - Begin TextBox - Visible = NotDefault - Enabled = NotDefault - Locked = NotDefault - SpecialEffect =0 - OverlapFlags =85 - BackStyle =0 - IMESentenceMode =3 - Left =2040 - Top =240 - Width =959 - TabIndex =51 - Name ="Master_PLANT_Code" - ControlSource ="Master_PLANT_Code" - StatusBarText ="Master Species PLANTS Code" - - Begin - Begin Label - OverlapFlags =85 - Left =180 - Top =240 - Width =1800 - Height =240 - FontWeight =700 - Name ="Label160" - Caption ="Master PLANTS Code" - End - End - End - Begin CommandButton - Visible = NotDefault - OverlapFlags =85 - Left =7740 - Top =6360 - Width =3510 - Height =405 - TabIndex =52 - ForeColor =3767809 - Name ="ButtonSave" - Caption ="Save this plant in detail record and close form" - OnClick ="[Event Procedure]" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - End - End - End -End -CodeBehindForm -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = True -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Compare Database - -Private Sub Form_Load() - Dim strSQL As String - Dim strSortBy As String - Dim strCol1 As String - - strSortBy = "Master_Plant_Code" - strCol1 = "Master_Plant_Code" - Me!Master_PLANT_Code.Visible = False - - strSQL = "SELECT " & strCol1 & ", Master_PLANT_Code AS [Master Plant Code], Master_Family AS [Master Family], Master_Species AS [Master Species], " & _ - "Master_Common_Name AS [Master Common Name], Utah_PLANT_Code AS [Utah Code], Utah_Species AS [Utah Species], " & _ - "Co_PLANT_Code AS [CO Code], Co_Species AS [CO Species], Wy_PLANT_code AS [WY Code], Wy_Species AS [WY Species] " & _ - "FROM tlu_NCPN_Plants ORDER BY " - Me!Select_Code.RowSource = strSQL & strSortBy -End Sub - -Private Sub Form_Open(Cancel As Integer) - Me![Select_Code] = Me![Master_PLANT_Code] -End Sub - -Private Sub Select_Code_AfterUpdate() - Me.RecordsetClone.FindFirst "[Master_PLANT_Code] = '" & Me![Select_Code].Column(1) & "'" - Me.Bookmark = Me.RecordsetClone.Bookmark -End Sub -Private Sub ButtonClose_Click() -On Error GoTo Err_ButtonClose_Click - - DoCmd.Close - -Exit_ButtonClose_Click: - Exit Sub - -Err_ButtonClose_Click: - MsgBox Err.Description - Resume Exit_ButtonClose_Click - -End Sub - -Private Sub Sort_Options_AfterUpdate() - Dim strSQL As String - Dim strSortBy As String - Dim strCol1 As String - - Select Case Sort_Options - Case 1 - strSortBy = "Master_Plant_Code" - strCol1 = "Master_Plant_Code" - Me!Combo_Caption.Caption = "Master PLANTS Code" - Me!Master_PLANT_Code.Visible = False - Case 2 - strSortBy = "Master_Species" - strCol1 = "Master_Species" - Me!Combo_Caption.Caption = "Master Species" - Me!Master_PLANT_Code.Visible = True - Case 3 - strSortBy = "Master_Family, Master_Species" - strCol1 = "Master_Family" - Me!Combo_Caption.Caption = "Master Family" - Me!Master_PLANT_Code.Visible = True - Case Else - strSortBy = "Master_Common_Name" - strCol1 = "Master_Common_Name" - Me!Combo_Caption.Caption = "Master Common Name" - Me!Master_PLANT_Code.Visible = True - End Select - - strSQL = "SELECT " & strCol1 & ", Master_PLANT_Code AS [Master Plant Code], Master_Family AS [Master Family], Master_Species AS [Master Species], " & _ - "Master_Common_Name AS [Master Common Name], Utah_PLANT_Code AS [Utah Code], Utah_Species AS [Utah Species], " & _ - "Co_PLANT_Code AS [CO Code], Co_Species AS [CO Species], Wy_PLANT_code AS [WY Code], Wy_Species AS [WY Species] " & _ - "FROM tlu_NCPN_Plants ORDER BY " - Me!Select_Code.RowSource = strSQL & strSortBy - Me!Select_Code.Requery -End Sub -Private Sub ButtonSave_Click() -On Error GoTo Err_ButtonSave_Click - - If Not IsNull(Me.OpenArgs) Then - If Me.OpenArgs = "fsub_Quadrat_Shrubs" Then ' Find the right calling form - Forms!frm_Data_Entry!frm_Quadrat_Transect.Form!fsub_Quadrat.Form!fsub_Quadrat_Shrubs.Form!Master_Code = Me![Master_PLANT_Code] - Forms!frm_Data_Entry!frm_Quadrat_Transect.Form!fsub_Quadrat.Form!fsub_Quadrat_Shrubs.Form!Master_Code.Requery - ElseIf Me.OpenArgs = "fsub_Species" Then - Forms!frm_Data_Entry!frm_Quadrat_Transect.Form!fsub_Quadrat.Form!fsub_Species.Form!Master_Code = Me![Master_PLANT_Code] - Forms!frm_Data_Entry!frm_Quadrat_Transect.Form!fsub_Quadrat.Form!fsub_Species.Form!Master_Code.Requery - ElseIf Me.OpenArgs = "fsub_LP_Belt_Shrub" Then - If Not IsNull(DLookup("[Shrub_ID]", "tbl_LP_Shrub", "[Transect_ID] = '" & Forms!frm_Data_Entry!frm_LP_Belt_Transect.Form!fsub_LP_Belt_Shrub.Form!Transect_ID & "' AND [Species] = '" & Me![Master_PLANT_Code] & "'")) Then - MsgBox "This species is already recorded for this transect." - Else - Forms!frm_Data_Entry!frm_LP_Belt_Transect.Form!fsub_LP_Belt_Shrub.Form!species = Me![Master_PLANT_Code] - Forms!frm_Data_Entry!frm_LP_Belt_Transect.Form!fsub_LP_Belt_Shrub.Form!species.Requery - End If - ElseIf Me.OpenArgs = "fsub_LP_Exotic" Then - If Not IsNull(DLookup("[Exotic_ID]", "tbl_LP_Exotic", "[Transect_ID] = '" & Forms!frm_Data_Entry!frm_LP_Belt_Transect.Form!fsub_LP_Exotic.Form!Transect_ID & "' AND [Species] = '" & Me![Master_PLANT_Code] & "'")) Then - MsgBox "This species is already recorded for this transect." - Else - Forms!frm_Data_Entry!frm_LP_Belt_Transect.Form!fsub_LP_Exotic.Form!species = Me![Master_PLANT_Code] - Forms!frm_Data_Entry!frm_LP_Belt_Transect.Form!fsub_LP_Exotic.Form!species.Requery - End If - ElseIf Me.OpenArgs = "fsub_LP_Intercept" Then - If Not IsNull(DLookup("[LC_ID]", "tbl_LP_Lower_Canopy", "[Intercept_ID] = '" & Forms!frm_Data_Entry!frm_LP_Transect.Form!fsub_LP_Intercept.Form!fsub_LP_Lower_Canopy.Form!Intercept_ID & "' AND [Species] = '" & Me![Master_PLANT_Code] & "'")) Then - MsgBox "This species is already recorded for this point." - Else - Forms!frm_Data_Entry!frm_LP_Transect.Form!fsub_LP_Intercept.Form!Top = Me![Master_PLANT_Code] - Forms!frm_Data_Entry!frm_LP_Transect.Form!fsub_LP_Intercept.Form!Top.Requery - Forms!frm_Data_Entry!frm_LP_Transect.Form!fsub_LP_Intercept.Form!Alive.Enabled = True - End If - Else - If Not IsNull(DLookup("[LC_ID]", "tbl_LP_Lower_Canopy", "[Intercept_ID] = '" & Forms!frm_Data_Entry!frm_LP_Transect.Form!fsub_LP_Intercept.Form!fsub_LP_Lower_Canopy.Form!Intercept_ID & "' AND [Species] = '" & Me![Master_PLANT_Code] & "'")) Or Not IsNull(DLookup("[Intercept_ID]", "tbl_LP_Intercept", "[Intercept_ID] = '" & Forms!frm_Data_Entry!frm_LP_Transect.Form!fsub_LP_Intercept.Form!fsub_LP_Lower_Canopy.Form!Intercept_ID & "' AND [Top] = '" & Me![Master_PLANT_Code] & "'")) Then - MsgBox "This species is already recorded for this point." - Else - Forms!frm_Data_Entry!frm_LP_Transect.Form!fsub_LP_Intercept.Form!fsub_LP_Lower_Canopy.Form!species = Me![Master_PLANT_Code] - Forms!frm_Data_Entry!frm_LP_Transect.Form!fsub_LP_Intercept.Form!fsub_LP_Lower_Canopy.Form!species.Requery - End If - End If ' End if for form name tests - End If ' End if for null OpenArgs test - DoCmd.Close acForm, "frm_Master_Species" - -Exit_ButtonSave_Click: - Exit Sub - -Err_ButtonSave_Click: - MsgBox Err.Description - Resume Exit_ButtonSave_Click - -End Sub diff --git a/source/forms/_frm_Progress_Bar.bas b/source/forms/_frm_Progress_Bar.bas deleted file mode 100644 index 8d8081f..0000000 --- a/source/forms/_frm_Progress_Bar.bas +++ /dev/null @@ -1,451 +0,0 @@ -Version =20 -VersionRequired =20 -Begin Form - AllowFilters = NotDefault - PopUp = NotDefault - RecordSelectors = NotDefault - MaxButton = NotDefault - MinButton = NotDefault - ControlBox = NotDefault - NavigationButtons = NotDefault - AllowDeletions = NotDefault - CloseButton = NotDefault - DividingLines = NotDefault - AllowAdditions = NotDefault - AllowEdits = NotDefault - DefaultView =0 - AllowUpdating =2 - ScrollBars =0 - ViewsAllowed =1 - BorderStyle =1 - PictureAlignment =2 - DatasheetGridlinesBehavior =3 - GridX =24 - GridY =24 - Width =5340 - DatasheetFontHeight =11 - ItemSuffix =10 - Left =9150 - Top =4545 - Right =14490 - Bottom =5850 - DatasheetGridlinesColor =14806254 - RecSrcDt = Begin - 0x53fe177c5893e440 - End - Caption ="Progress" - DatasheetFontName ="Calibri" - PrtMip = Begin - 0x6801000068010000680100006801000000000000201c0000e010000001000000 , - 0x010000006801000000000000a10700000100000001000000 - End - OnLoad ="[Event Procedure]" - AllowDatasheetView =0 - AllowPivotTableView =0 - AllowPivotChartView =0 - AllowPivotChartView =0 - FilterOnLoad =0 - OrderByOnLoad =0 - SplitFormDatasheet =1 - SplitFormSplitterBar =0 - OrderByOnLoad =0 - SplitFormDatasheet =1 - SplitFormSplitterBar =0 - ShowPageMargins =0 - DisplayOnSharePointSite =1 - AllowLayoutView =0 - DatasheetAlternateBackColor =15921906 - DatasheetGridlinesColor12 =0 - FitToScreen =1 - DatasheetBackThemeColorIndex =1 - BorderThemeColorIndex =3 - ThemeFontIndex =1 - ForeThemeColorIndex =0 - AlternateBackThemeColorIndex =1 - AlternateBackShade =95.0 - Begin - Begin Label - BackStyle =0 - FontSize =11 - FontName ="Calibri" - ThemeFontIndex =1 - BackThemeColorIndex =1 - BorderThemeColorIndex =0 - BorderTint =50.0 - ForeThemeColorIndex =0 - ForeTint =50.0 - GridlineThemeColorIndex =1 - GridlineShade =65.0 - End - Begin Rectangle - SpecialEffect =3 - BackStyle =0 - BorderLineStyle =0 - BackThemeColorIndex =1 - BorderThemeColorIndex =1 - BorderShade =65.0 - GridlineThemeColorIndex =1 - GridlineShade =65.0 - End - Begin Section - Height =1320 - Name ="Detail" - AlternateBackColor =15921906 - AlternateBackThemeColorIndex =1 - AlternateBackShade =95.0 - BackThemeColorIndex =1 - Begin - Begin Label - OverlapFlags =85 - Left =300 - Top =780 - Width =4680 - Height =314 - BorderColor =8355711 - ForeColor =8355711 - Name ="lblMsg" - Caption ="Msg" - GridlineColor =10921638 - LayoutCachedLeft =300 - LayoutCachedTop =780 - LayoutCachedWidth =4980 - LayoutCachedHeight =1094 - End - Begin Rectangle - SpecialEffect =0 - OldBorderStyle =0 - OverlapFlags =85 - Left =300 - Top =180 - Width =360 - Height =420 - BackColor =5167783 - BorderColor =10921638 - Name ="bx10" - GridlineColor =10921638 - LayoutCachedLeft =300 - LayoutCachedTop =180 - LayoutCachedWidth =660 - LayoutCachedHeight =600 - BackThemeColorIndex =-1 - End - Begin Rectangle - SpecialEffect =0 - OldBorderStyle =0 - OverlapFlags =85 - Left =1260 - Top =180 - Width =360 - Height =420 - BackColor =5167783 - BorderColor =10921638 - Name ="bx30" - GridlineColor =10921638 - LayoutCachedLeft =1260 - LayoutCachedTop =180 - LayoutCachedWidth =1620 - LayoutCachedHeight =600 - BackThemeColorIndex =-1 - End - Begin Rectangle - SpecialEffect =0 - OldBorderStyle =0 - OverlapFlags =85 - Left =2220 - Top =180 - Width =360 - Height =420 - BackColor =5167783 - BorderColor =10921638 - Name ="bx50" - GridlineColor =10921638 - LayoutCachedLeft =2220 - LayoutCachedTop =180 - LayoutCachedWidth =2580 - LayoutCachedHeight =600 - BackThemeColorIndex =-1 - End - Begin Rectangle - SpecialEffect =0 - OldBorderStyle =0 - OverlapFlags =85 - Left =1740 - Top =180 - Width =360 - Height =420 - BackColor =5167783 - BorderColor =10921638 - Name ="bx40" - GridlineColor =10921638 - LayoutCachedLeft =1740 - LayoutCachedTop =180 - LayoutCachedWidth =2100 - LayoutCachedHeight =600 - BackThemeColorIndex =-1 - End - Begin Rectangle - SpecialEffect =0 - OldBorderStyle =0 - OverlapFlags =85 - Left =780 - Top =180 - Width =360 - Height =420 - BackColor =5167783 - BorderColor =10921638 - Name ="bx20" - GridlineColor =10921638 - LayoutCachedLeft =780 - LayoutCachedTop =180 - LayoutCachedWidth =1140 - LayoutCachedHeight =600 - BackThemeColorIndex =-1 - End - Begin Rectangle - SpecialEffect =0 - OldBorderStyle =0 - OverlapFlags =85 - Left =2700 - Top =180 - Width =360 - Height =420 - BackColor =5167783 - BorderColor =10921638 - Name ="bx60" - GridlineColor =10921638 - LayoutCachedLeft =2700 - LayoutCachedTop =180 - LayoutCachedWidth =3060 - LayoutCachedHeight =600 - BackThemeColorIndex =-1 - End - Begin Rectangle - SpecialEffect =0 - OldBorderStyle =0 - OverlapFlags =85 - Left =3660 - Top =180 - Width =360 - Height =420 - BackColor =5167783 - BorderColor =10921638 - Name ="bx80" - GridlineColor =10921638 - LayoutCachedLeft =3660 - LayoutCachedTop =180 - LayoutCachedWidth =4020 - LayoutCachedHeight =600 - BackThemeColorIndex =-1 - End - Begin Rectangle - SpecialEffect =0 - OldBorderStyle =0 - OverlapFlags =85 - Left =4620 - Top =180 - Width =360 - Height =420 - BackColor =5167783 - BorderColor =10921638 - Name ="bx100" - GridlineColor =10921638 - LayoutCachedLeft =4620 - LayoutCachedTop =180 - LayoutCachedWidth =4980 - LayoutCachedHeight =600 - BackThemeColorIndex =-1 - End - Begin Rectangle - SpecialEffect =0 - OldBorderStyle =0 - OverlapFlags =85 - Left =4140 - Top =180 - Width =360 - Height =420 - BackColor =5167783 - BorderColor =10921638 - Name ="bx90" - GridlineColor =10921638 - LayoutCachedLeft =4140 - LayoutCachedTop =180 - LayoutCachedWidth =4500 - LayoutCachedHeight =600 - BackThemeColorIndex =-1 - End - Begin Rectangle - SpecialEffect =0 - OldBorderStyle =0 - OverlapFlags =85 - Left =3180 - Top =180 - Width =360 - Height =420 - BackColor =5167783 - BorderColor =10921638 - Name ="bx70" - GridlineColor =10921638 - LayoutCachedLeft =3180 - LayoutCachedTop =180 - LayoutCachedWidth =3540 - LayoutCachedHeight =600 - BackThemeColorIndex =-1 - End - End - End - End -End -CodeBehindForm -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = True -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Compare Database -Option Explicit - -' ================================= -' MODULE: Form_frmProgressBar -' Description: Progress bar functions & procedures -' -' Source/date: Bonnie Campbell, 5/17/2015 -' Revisions: BLC - 5/17/2015 - initial version -' ================================= - -'================================================================= -' Properties -'================================================================= -' See mod_App_Settings for PROGRESS_BAR color setting - -'================================================================= -' Subroutines & Functions -'================================================================= - -' --------------------------------- -' SUB: Form_Load -' Description: Load the progress bar form -' Assumptions: none -' Parameters: - -' Returns: N/A -' Throws: none -' References: none -' Source/date: http://archive.oreilly.com/pub/h/2607 -' Adapted: Bonnie Campbell, May 14, 2015 - for NCPN tools -' Revisions: -' BLC - 5/14/2015 - initial version -' --------------------------------- -Private Sub Form_Load() -On Error GoTo Err_Handler - - frm_ProgressBar_Initialize - -Exit_Sub: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Form_Load[form_frm_ProgressBar])" - End Select - Resume Exit_Sub -End Sub - -' --------------------------------- -' SUB: frm_ProgressBar_Initialize -' Description: Increase the percent value for the progress bar -' Assumptions: none -' Parameters: - -' Returns: N/A -' Throws: none -' References: none -' Source/date: http://archive.oreilly.com/pub/h/2607 -' Adapted: Bonnie Campbell, May 14, 2015 - for NCPN tools -' Revisions: -' BLC - 5/14/2015 - initial version -' --------------------------------- -Public Sub frm_ProgressBar_Initialize() -On Error GoTo Err_Handler - Dim i As Integer - Dim strBox As String - - With Me - .Caption = "Progress" '"0% Complete" - -' !bx80.visible = True -' !bx80.backstyle = Normal -' !bx80.backcolor = 6750105 - -' .Repaint - End With - -' DoEvents - - 'unhide the progress bar -' For i = 1 To 10 - -' strBox = "bx" & CStr(i * 10) -' Me.Controls(strBox).backstyle = Normal -' Me.Controls(strBox).visible = True -' Me.Controls(strBox).backcolor = PROGRESS_BAR -' bx10.backcolor = PROGRESS_BAR -' bx20.backstyle = Normal -' bx20.backcolor = PROGRESS_BAR -' Me.Repaint - -' Next - -Exit_Sub: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Initialize[form_frm_ProgressBar])" - End Select - Resume Exit_Sub -End Sub - -' --------------------------------- -' FUNCTION: Increment -' Description: Increase the percent value for the progress bar -' Assumptions: none -' Parameters: sPercentComplete - value (single) -' strDescription - label (string) -' Returns: N/A -' Throws: none -' References: none -' Source/date: http://archive.oreilly.com/pub/h/2607 -' Adapted: Bonnie Campbell, May 14, 2015 - for NCPN tools -' Revisions: -' BLC - 5/14/2015 - initial version -' --------------------------------- -Public Function Increment(sPercentComplete As Single, _ - strDescription As String) -On Error GoTo Err_Handler - -Me.lblMsg.Caption = strDescription -Me.Repaint -Dim iPercentIncrement As Integer -Dim strBox As String - - iPercentIncrement = Format(sPercentComplete, "#") - - strBox = "bx" & sPercentComplete - 'Me.Controls(strBox).backstyle = acNormal - 'Me.Controls(strBox).backcolor = PROGRESS_BAR -' Me.Controls(strBox).visible = True -' Me.Caption = sPercentComplete & "% Complete" - Me.Repaint - -Exit_Function: - Exit Function - -Err_Handler: - Select Case Err.Number - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Increment[form_frm_Species_Search])" - End Select - Resume Exit_Function -End Function diff --git a/source/forms/_frm_Progress_Meter.bas b/source/forms/_frm_Progress_Meter.bas deleted file mode 100644 index 52bdfa2..0000000 --- a/source/forms/_frm_Progress_Meter.bas +++ /dev/null @@ -1,178 +0,0 @@ -Version =20 -VersionRequired =20 -Begin Form - AllowFilters = NotDefault - PopUp = NotDefault - Modal = NotDefault - RecordSelectors = NotDefault - MaxButton = NotDefault - MinButton = NotDefault - ControlBox = NotDefault - AutoCenter = NotDefault - NavigationButtons = NotDefault - AllowDeletions = NotDefault - CloseButton = NotDefault - DividingLines = NotDefault - DefaultView =0 - AllowUpdating =2 - ScrollBars =0 - ViewsAllowed =1 - TabularFamily =48 - BorderStyle =3 - PictureAlignment =2 - DatasheetGridlinesBehavior =3 - Cycle =1 - GridX =24 - GridY =24 - Width =4500 - DatasheetFontHeight =9 - ItemSuffix =3 - Left =6015 - Top =8790 - Right =14730 - Bottom =11190 - DatasheetGridlinesColor =12632256 - RecSrcDt = Begin - 0xa1ceefae8e63e340 - End - DatasheetFontName ="Arial" - PrtMip = Begin - 0xa0050000a0050000a0050000a005000000000000201c0000e010000001000000 , - 0x010000006801000000000000a10700000100000001000000 - End - AllowDatasheetView =0 - AllowPivotTableView =0 - AllowPivotChartView =0 - AllowPivotChartView =0 - FilterOnLoad =0 - AllowLayoutView =0 - DatasheetGridlinesColor12 =12632256 - Begin - Begin Label - BackStyle =0 - FontName ="Tahoma" - End - Begin CommandButton - FontSize =8 - FontWeight =400 - ForeColor =-2147483630 - FontName ="Tahoma" - BorderLineStyle =0 - End - Begin TextBox - FELineBreak = NotDefault - SpecialEffect =2 - OldBorderStyle =0 - BorderLineStyle =0 - FontName ="Tahoma" - AsianLineBreak =255 - End - Begin Section - Height =1080 - BackColor =-2147483633 - Name ="Detail" - Begin - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - SpecialEffect =0 - OldBorderStyle =1 - OverlapFlags =85 - TextFontCharSet =255 - TextFontFamily =49 - IMESentenceMode =3 - Left =120 - Top =240 - Width =3420 - FontSize =12 - BackColor =-2147483643 - ForeColor =16711680 - Name ="tbxProgress" - DefaultValue ="\"ÛÛÛÛÛÛÛÛÛÛ\"" - FontName ="Terminal" - - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - SpecialEffect =0 - OverlapFlags =85 - BackStyle =0 - IMESentenceMode =3 - Left =120 - Top =660 - Width =4260 - Height =315 - FontSize =11 - TabIndex =1 - BackColor =-2147483643 - ForeColor =8355711 - Name ="tbxMsg" - FontName ="Calibri" - - LayoutCachedLeft =120 - LayoutCachedTop =660 - LayoutCachedWidth =4380 - LayoutCachedHeight =975 - ThemeFontIndex =1 - ForeThemeColorIndex =0 - ForeTint =50.0 - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - SpecialEffect =0 - OverlapFlags =93 - TextAlign =3 - BackStyle =0 - IMESentenceMode =3 - Left =3660 - Top =240 - Width =420 - Height =315 - FontSize =11 - TabIndex =2 - BackColor =-2147483643 - ForeColor =8355711 - Name ="tbxPercent" - FontName ="Calibri" - - LayoutCachedLeft =3660 - LayoutCachedTop =240 - LayoutCachedWidth =4080 - LayoutCachedHeight =555 - ThemeFontIndex =1 - ForeThemeColorIndex =0 - ForeTint =50.0 - End - Begin Label - OverlapFlags =87 - TextAlign =3 - Left =4080 - Top =240 - Width =240 - Height =315 - FontSize =11 - BackColor =-2147483633 - ForeColor =8355711 - Name ="lblPercent" - Caption ="%" - FontName ="Calibri" - LayoutCachedLeft =4080 - LayoutCachedTop =240 - LayoutCachedWidth =4320 - LayoutCachedHeight =555 - ThemeFontIndex =1 - ForeThemeColorIndex =0 - ForeTint =50.0 - End - End - End - End -End diff --git a/source/forms/_frm_QA_Tool.bas b/source/forms/_frm_QA_Tool.bas deleted file mode 100644 index 9859a79..0000000 --- a/source/forms/_frm_QA_Tool.bas +++ /dev/null @@ -1,2738 +0,0 @@ -Version =20 -VersionRequired =20 -Begin Form - AllowFilters = NotDefault - RecordSelectors = NotDefault - MaxButton = NotDefault - MinButton = NotDefault - ControlBox = NotDefault - AutoCenter = NotDefault - NavigationButtons = NotDefault - AllowDeletions = NotDefault - CloseButton = NotDefault - DividingLines = NotDefault - DefaultView =0 - ScrollBars =0 - ViewsAllowed =1 - BorderStyle =3 - PictureAlignment =2 - DatasheetGridlinesBehavior =3 - Cycle =2 - GridX =24 - GridY =24 - Width =14415 - DatasheetFontHeight =10 - ItemSuffix =677 - Right =7650 - Bottom =10995 - DatasheetGridlinesColor =12632256 - Filter ="[Query_name] = \"qa_a111_Overview_transect_pt_duplicates\" AND [Time_frame] = \"" - "2014\" AND [Data_scope] = 0" - RecSrcDt = Begin - 0xdef19da9b06be340 - End - OnDirty ="[Event Procedure]" - RecordSource ="tbl_QA_Results" - Caption =" Data Validation and Quality Review Tool" - OnOpen ="[Event Procedure]" - DatasheetFontName ="Arial" - PrtMip = Begin - 0xa0050000a0050000a0050000a005000000000000201c0000e010000001000000 , - 0x010000006801000000000000a10700000100000001000000 - End - OnLoad ="[Event Procedure]" - AllowDatasheetView =0 - AllowPivotTableView =0 - AllowPivotChartView =0 - AllowPivotChartView =0 - FilterOnLoad =0 - AllowLayoutView =0 - DatasheetGridlinesColor12 =12632256 - Begin - Begin Label - FontItalic = NotDefault - OldBorderStyle =1 - TextAlign =1 - FontWeight =700 - BackColor =8388608 - BorderColor =8388608 - ForeColor =16777215 - FontName ="Arial" - End - Begin Rectangle - BackStyle =0 - BorderWidth =2 - BorderLineStyle =0 - BorderColor =8388608 - End - Begin Line - BorderWidth =2 - BorderLineStyle =0 - BorderColor =8388608 - End - Begin Image - BackStyle =0 - BorderLineStyle =0 - PictureAlignment =2 - BorderColor =16776960 - End - Begin CommandButton - FontItalic = NotDefault - FontSize =8 - ForeColor =-2147483630 - FontName ="Arial" - BorderLineStyle =0 - End - Begin OptionButton - SpecialEffect =4 - BorderWidth =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - BorderColor =8388608 - End - Begin CheckBox - SpecialEffect =4 - BorderWidth =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - BorderColor =8388608 - End - Begin OptionGroup - BorderLineStyle =0 - BackColor =8421376 - BorderColor =16776960 - End - Begin BoundObjectFrame - BorderLineStyle =0 - BackStyle =0 - BorderColor =16776960 - End - Begin TextBox - BorderLineStyle =0 - BackColor =8421376 - BorderColor =16776960 - ForeColor =16777215 - FontName ="Arial" - End - Begin ListBox - BorderLineStyle =0 - BackColor =8421376 - ForeColor =16777215 - BorderColor =16776960 - FontName ="Arial" - End - Begin ComboBox - BorderLineStyle =0 - BackColor =8421376 - BorderColor =16776960 - ForeColor =16777215 - FontName ="Arial" - End - Begin Subform - BorderLineStyle =0 - BorderColor =16776960 - End - Begin UnboundObjectFrame - BackStyle =0 - OldBorderStyle =1 - BorderColor =16776960 - End - Begin ToggleButton - FontItalic = NotDefault - FontSize =8 - ForeColor =-2147483630 - FontName ="Arial" - BorderLineStyle =0 - End - Begin Tab - FontItalic = NotDefault - BackStyle =0 - FontWeight =700 - FontName ="Arial" - BorderLineStyle =0 - End - Begin Section - CanGrow = NotDefault - Height =11535 - BackColor =13025979 - Name ="Detail" - Begin - Begin Tab - OverlapFlags =85 - Top =495 - Width =14415 - Height =11040 - Name ="PageTabs" - OnChange ="[Event Procedure]" - - LayoutCachedTop =495 - LayoutCachedWidth =14415 - LayoutCachedHeight =11535 - Begin - Begin Page - OverlapFlags =87 - Left =120 - Top =900 - Width =14160 - Height =10503 - Name ="pgResults" - Caption =" Results summary" - LayoutCachedLeft =120 - LayoutCachedTop =900 - LayoutCachedWidth =14280 - LayoutCachedHeight =11403 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =2 - WebImagePaddingBottom =2 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =215 - TextAlign =0 - Left =120 - Top =900 - Width =3300 - Height =423 - FontWeight =400 - BackColor =16777215 - BorderColor =0 - ForeColor =0 - Name ="labOverview" - Caption ="* Double-click on the label to change sort order. Click on a query name to open" - "." - ControlTipText ="View mode" - End - Begin CommandButton - FontItalic = NotDefault - OverlapFlags =215 - Left =9900 - Top =960 - Width =1500 - Height =300 - Name ="cmdRefresh" - Caption ="Refresh results" - OnClick ="[Event Procedure]" - ControlTipText ="Run the validation queries and refresh the results summary" - - LayoutCachedLeft =9900 - LayoutCachedTop =960 - LayoutCachedWidth =11400 - LayoutCachedHeight =1260 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin CommandButton - FontItalic = NotDefault - OverlapFlags =215 - Left =11640 - Top =960 - Width =2100 - Height =300 - TabIndex =1 - Name ="cmdViewReport" - Caption ="View summary report" - OnClick ="[Event Procedure]" - ControlTipText ="View the quality review results as a report" - - LayoutCachedLeft =11640 - LayoutCachedTop =960 - LayoutCachedWidth =13740 - LayoutCachedHeight =1260 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin Subform - CanShrink = NotDefault - OverlapFlags =247 - Left =120 - Top =1350 - Width =14160 - Height =10053 - TabIndex =2 - BorderColor =0 - Name ="subResults" - SourceObject ="Form._fsub_QA_Results" - LinkChildFields ="Time_frame;Data_scope" - LinkMasterFields ="cmbTimeframe;optgScope" - - LayoutCachedLeft =120 - LayoutCachedTop =1350 - LayoutCachedWidth =14280 - LayoutCachedHeight =11403 - End - Begin ComboBox - LimitToList = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - RowSourceTypeInt =1 - SpecialEffect =2 - OverlapFlags =215 - TextAlign =2 - IMESentenceMode =3 - ColumnCount =2 - Left =5490 - Top =997 - Width =1170 - TabIndex =3 - BackColor =-2147483643 - BorderColor =0 - ForeColor =-2147483640 - Name ="cmbTypeFilter" - RowSourceType ="Value List" - RowSource ="1;Critical;2;Warning;3;Information" - ColumnWidths ="0;2160" - StatusBarText ="Filter by query type" - AfterUpdate ="[Event Procedure]" - ControlTipText ="Filter by query type" - - LayoutCachedLeft =5490 - LayoutCachedTop =997 - LayoutCachedWidth =6660 - LayoutCachedHeight =1237 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =215 - TextAlign =3 - Left =4260 - Top =990 - Width =1110 - Height =240 - FontWeight =400 - BackColor =-2147483633 - BorderColor =0 - ForeColor =-2147483630 - Name ="labTypeFilter" - Caption ="Query type:" - LayoutCachedLeft =4260 - LayoutCachedTop =990 - LayoutCachedWidth =5370 - LayoutCachedHeight =1230 - End - End - End - Begin ToggleButton - FontItalic = NotDefault - TabStop = NotDefault - OverlapFlags =215 - Left =6780 - Top =960 - Width =480 - Height =300 - FontWeight =400 - TabIndex =4 - ForeColor =0 - Name ="togFilterByType" - AfterUpdate ="[Event Procedure]" - DefaultValue ="0" - Caption ="Filter on" - PictureData = Begin - 0x2800000010000000100000000100040000000000800000000000000000000000 , - 0x0000000000000000000000000000800000800000008080008000000080008000 , - 0x8080000080808000c0c0c0000000ff00c0c0c00000ffff00ff000000c0c0c000 , - 0xffff0000ffffff00dadadadadadadadaadadadadadadadaddadadadadadadada , - 0xadadad0000adadaddadada0660dadadaadadad0660adadaddadada0f80dadada , - 0xadadad0f80adadaddadad088860adadaadad06888660adaddad068f888660ada , - 0xad068f88888660add068fff88886660aa00000000000000ddadadadadadadada , - 0xadadadadadadadad - End - ObjectPalette = Begin - 0x000301000000000000000000 - End - ControlTipText ="Turn the type filter on or off" - - LayoutCachedLeft =6780 - LayoutCachedTop =960 - LayoutCachedWidth =7260 - LayoutCachedHeight =1260 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin ComboBox - LimitToList = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - RowSourceTypeInt =1 - SpecialEffect =2 - OverlapFlags =215 - TextAlign =2 - IMESentenceMode =3 - Left =8220 - Top =997 - Width =900 - TabIndex =5 - BackColor =-2147483643 - BorderColor =0 - ForeColor =-2147483640 - Name ="cmbDoneFilter" - RowSourceType ="Value List" - RowSource ="True;False" - StatusBarText ="Filter by the 'Done' flag" - AfterUpdate ="[Event Procedure]" - ControlTipText ="Filter by the 'Done' flag" - - LayoutCachedLeft =8220 - LayoutCachedTop =997 - LayoutCachedWidth =9120 - LayoutCachedHeight =1237 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =215 - TextAlign =3 - Left =7500 - Top =997 - Width =600 - Height =228 - FontWeight =400 - BackColor =-2147483633 - BorderColor =0 - ForeColor =-2147483630 - Name ="labDoneFilter" - Caption ="Done:" - LayoutCachedLeft =7500 - LayoutCachedTop =997 - LayoutCachedWidth =8100 - LayoutCachedHeight =1225 - End - End - End - Begin ToggleButton - FontItalic = NotDefault - TabStop = NotDefault - OverlapFlags =215 - Left =9240 - Top =960 - Width =480 - Height =300 - FontWeight =400 - TabIndex =6 - ForeColor =0 - Name ="togFilterByDone" - AfterUpdate ="[Event Procedure]" - DefaultValue ="0" - Caption ="Filter on" - PictureData = Begin - 0x2800000010000000100000000100040000000000800000000000000000000000 , - 0x0000000000000000000000000000800000800000008080008000000080008000 , - 0x8080000080808000c0c0c0000000ff00c0c0c00000ffff00ff000000c0c0c000 , - 0xffff0000ffffff00dadadadadadadadaadadadadadadadaddadadadadadadada , - 0xadadad0000adadaddadada0660dadadaadadad0660adadaddadada0f80dadada , - 0xadadad0f80adadaddadad088860adadaadad06888660adaddad068f888660ada , - 0xad068f88888660add068fff88886660aa00000000000000ddadadadadadadada , - 0xadadadadadadadad - End - ObjectPalette = Begin - 0x000301000000000000000000 - End - ControlTipText ="Turn the 'Done' filter on or off" - - LayoutCachedLeft =9240 - LayoutCachedTop =960 - LayoutCachedWidth =9720 - LayoutCachedHeight =1260 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - End - End - Begin Page - OverlapFlags =247 - Left =120 - Top =900 - Width =14160 - Height =10500 - Name ="pgQueryViews" - Caption =" View and fix query results" - LayoutCachedLeft =120 - LayoutCachedTop =900 - LayoutCachedWidth =14280 - LayoutCachedHeight =11400 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =2 - WebImagePaddingBottom =2 - Begin - Begin CommandButton - FontItalic = NotDefault - OverlapFlags =247 - Left =8040 - Top =1035 - Width =1320 - Height =317 - Name ="cmdDesignView" - Caption ="Design view" - OnClick ="[Event Procedure]" - ControlTipText ="Open the selected query in design view" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin ComboBox - LimitToList = NotDefault - AllowAutoCorrect = NotDefault - SpecialEffect =2 - OverlapFlags =247 - IMESentenceMode =3 - Left =1260 - Top =1050 - Width =6660 - Height =252 - TabIndex =1 - BackColor =-2147483643 - BorderColor =0 - ForeColor =-2147483640 - ColumnInfo ="\"\";\"\";\"10\";\"510\"" - Name ="selObject" - RowSourceType ="Table/Query" - RowSource ="SELECT MSysObjects.Name AS Query_name FROM MSysObjects WHERE (((MSysObjects.Name" - ") Like \"qa_*\") AND ((MSysObjects.Type)=5)) ORDER BY MSysObjects.Name; " - AfterUpdate ="[Event Procedure]" - - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =247 - TextAlign =0 - Left =120 - Top =1050 - Width =1110 - Height =270 - BackColor =-2147483633 - BorderColor =0 - ForeColor =-2147483630 - Name ="labObject" - Caption ="Query name" - End - End - End - Begin TextBox - Locked = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - SpecialEffect =2 - OverlapFlags =247 - IMESentenceMode =3 - Left =10080 - Top =1050 - Width =2220 - Height =252 - TabIndex =2 - BackColor =16777215 - ForeColor =0 - Name ="txtUser" - ControlSource ="QA_user" - OnDirty ="[Event Procedure]" - - LayoutCachedLeft =10080 - LayoutCachedTop =1050 - LayoutCachedWidth =12300 - LayoutCachedHeight =1302 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =247 - TextAlign =0 - Left =9480 - Top =1050 - Width =570 - Height =270 - BackColor =-2147483633 - BorderColor =0 - ForeColor =-2147483630 - Name ="labUser" - Caption ="QA by" - LayoutCachedLeft =9480 - LayoutCachedTop =1050 - LayoutCachedWidth =10050 - LayoutCachedHeight =1320 - End - End - End - Begin TextBox - Locked = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - SpecialEffect =2 - OverlapFlags =247 - IMESentenceMode =3 - Left =12360 - Top =1050 - Width =1920 - Height =252 - TabIndex =3 - BackColor =16777215 - ForeColor =0 - Name ="txtRemedy_date" - ControlSource ="Remedy_date" - Format ="mm/dd/yy" - - LayoutCachedLeft =12360 - LayoutCachedTop =1050 - LayoutCachedWidth =14280 - LayoutCachedHeight =1302 - End - Begin TextBox - Locked = NotDefault - TabStop = NotDefault - EnterKeyBehavior = NotDefault - AllowAutoCorrect = NotDefault - ScrollBars =2 - SpecialEffect =2 - OverlapFlags =247 - IMESentenceMode =3 - Left =1260 - Top =1410 - Width =13020 - Height =660 - TabIndex =4 - BackColor =16777215 - ForeColor =0 - Name ="txtQueryDesc" - ControlSource ="Query_description" - StatusBarText ="Description of the query" - OnDirty ="[Event Procedure]" - - LayoutCachedLeft =1260 - LayoutCachedTop =1410 - LayoutCachedWidth =14280 - LayoutCachedHeight =2070 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =247 - TextAlign =0 - Left =120 - Top =1410 - Width =1035 - Height =495 - BackColor =-2147483633 - BorderColor =0 - ForeColor =-2147483630 - Name ="labQueryDesc" - Caption ="Query description" - End - End - End - Begin TextBox - Locked = NotDefault - EnterKeyBehavior = NotDefault - AllowAutoCorrect = NotDefault - ScrollBars =2 - SpecialEffect =2 - OverlapFlags =247 - IMESentenceMode =3 - Left =1260 - Top =2190 - Width =13020 - Height =810 - TabIndex =5 - BackColor =16777215 - ForeColor =0 - Name ="txtRemedy" - ControlSource ="Remedy_desc" - StatusBarText ="Details about actions taken and/or not taken to resolve errors" - - LayoutCachedLeft =1260 - LayoutCachedTop =2190 - LayoutCachedWidth =14280 - LayoutCachedHeight =3000 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =247 - TextAlign =0 - Left =120 - Top =2190 - Width =810 - Height =495 - BackColor =-2147483633 - BorderColor =0 - ForeColor =-2147483630 - Name ="labRemedy" - Caption ="Remedy details" - End - End - End - Begin Subform - Locked = NotDefault - OverlapFlags =247 - SpecialEffect =2 - Left =120 - Top =3555 - Width =14160 - Height =7845 - TabIndex =6 - BorderColor =0 - Name ="subQueryResults" - - LayoutCachedLeft =120 - LayoutCachedTop =3555 - LayoutCachedWidth =14280 - LayoutCachedHeight =11400 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =255 - TextAlign =0 - Left =120 - Top =3315 - Width =1212 - Height =252 - BackColor =-2147483633 - BorderColor =0 - ForeColor =-2147483630 - Name ="labQueryResults" - Caption ="Query results" - LayoutCachedLeft =120 - LayoutCachedTop =3315 - LayoutCachedWidth =1332 - LayoutCachedHeight =3567 - End - End - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - FELineBreak = NotDefault - OldBorderStyle =0 - OverlapFlags =247 - TextAlign =2 - IMESentenceMode =3 - Left =3270 - Top =3180 - Width =606 - Height =255 - FontSize =9 - FontWeight =700 - TabIndex =7 - BackColor =8454143 - BorderColor =0 - ForeColor =0 - Name ="txtEditQuery" - FontName ="Tahoma" - AsianLineBreak =255 - - LayoutCachedLeft =3270 - LayoutCachedTop =3180 - LayoutCachedWidth =3876 - LayoutCachedHeight =3435 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =247 - TextAlign =3 - Left =1440 - Top =3180 - Width =1770 - Height =255 - FontSize =9 - FontWeight =400 - BackColor =16777215 - BorderColor =0 - ForeColor =0 - Name ="labEditQuery" - Caption ="Edit results directly?" - FontName ="Tahoma" - LayoutCachedLeft =1440 - LayoutCachedTop =3180 - LayoutCachedWidth =3210 - LayoutCachedHeight =3435 - End - End - End - Begin CommandButton - Enabled = NotDefault - FontItalic = NotDefault - OverlapFlags =247 - Left =4620 - Top =3120 - Width =1080 - Height =317 - TabIndex =8 - ForeColor =0 - Name ="cmdAutoFix" - Caption ="Auto-fix" - StatusBarText ="Run a pre-built query to automatically fix all the records" - OnClick ="[Event Procedure]" - ControlTipText ="Run a pre-built query to automatically fix all the records" - - LayoutCachedLeft =4620 - LayoutCachedTop =3120 - LayoutCachedWidth =5700 - LayoutCachedHeight =3437 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin CommandButton - FontItalic = NotDefault - OverlapFlags =247 - Left =6240 - Top =3120 - Width =2040 - Height =317 - TabIndex =9 - ForeColor =0 - Name ="cmdOpenRecord" - Caption ="Open selected record" - StatusBarText ="Open the form / query / table specified in the query to the record selected in t" - "he subform" - OnClick ="[Event Procedure]" - ControlTipText ="Open the form / query / table specified in the query to the record selected in t" - "he subform" - - LayoutCachedLeft =6240 - LayoutCachedTop =3120 - LayoutCachedWidth =8280 - LayoutCachedHeight =3437 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin CommandButton - FontItalic = NotDefault - OverlapFlags =247 - Left =8580 - Top =3120 - Height =317 - TabIndex =10 - ForeColor =0 - Name ="cmdOpenBrowser" - Caption ="Data browser" - StatusBarText ="Open the project data browser" - OnClick ="[Event Procedure]" - ControlTipText ="Open the project data browser" - - LayoutCachedLeft =8580 - LayoutCachedTop =3120 - LayoutCachedWidth =10020 - LayoutCachedHeight =3437 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin CommandButton - FontItalic = NotDefault - OverlapFlags =247 - Left =10500 - Top =3061 - Width =426 - Height =426 - FontWeight =400 - TabIndex =11 - Name ="cmdExport" - Caption ="Export to Excel" - StatusBarText ="Export the results of the selected query to Excel" - OnClick ="[Event Procedure]" - PictureData = Begin - 0x2800000010000000100000000100040000000000800000000000000000000000 , - 0x0000000000000000000000000000800000800000008080008000000080008000 , - 0x8080000080808000c0c0c0000000ff00c0c0c00000ffff00ff000000c0c0c000 , - 0xffff0000ffffff00dadadadadadadada0000000dadadadadd00000dadadadada , - 0xad000dadadadadaddad0dadadadadadaadadadadad72727ddada2727272f272a , - 0xadad727272f272addada27272f2727daadada272f27272addadada2f2727dada , - 0xadada2f272727daddada2f27272727daadad72727d7272addada2727dad727da , - 0xadadadadadadadad - End - FontName ="Tahoma" - ObjectPalette = Begin - 0x000301000000000000000000 - End - ControlTipText ="Export the results of the selected query to Excel" - - LayoutCachedLeft =10500 - LayoutCachedTop =3061 - LayoutCachedWidth =10926 - LayoutCachedHeight =3487 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin CommandButton - FontItalic = NotDefault - OverlapFlags =247 - Left =11040 - Top =3060 - Width =426 - Height =426 - FontWeight =400 - TabIndex =12 - Name ="cmdCloseup" - Caption ="Zoom" - StatusBarText ="Open the selected query in a new window" - OnClick ="[Event Procedure]" - PictureData = Begin - 0x2800000010000000100000000100040000000000800000000000000000000000 , - 0x0000000000000000000000000000800000800000008080008000000080008000 , - 0x8080000080808000c0c0c0000000ff00c0c0c00000ffff00ff000000c0c0c000 , - 0xffff0000ffffff00dadadadadadadada00adadadadadadad000adadadadadada , - 0xa000adadadadadadda000a700007dadaada0000888800daddada07ee888870da , - 0xada708e88888807ddad08e888888880aada088888888880ddad088888888e80a , - 0xada088888888e80ddad70888888ee07aadad07888eee70addadad00888800ada , - 0xadadad700007adad - End - FontName ="Tahoma" - ObjectPalette = Begin - 0x000301000000000000000000 - End - ControlTipText ="Open the selected query in a new window" - - LayoutCachedLeft =11040 - LayoutCachedTop =3060 - LayoutCachedWidth =11466 - LayoutCachedHeight =3486 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin CommandButton - FontItalic = NotDefault - OverlapFlags =247 - Left =12600 - Top =3120 - Width =1020 - Height =317 - TabIndex =13 - ForeColor =0 - Name ="cmdRequery" - Caption ="Requery" - OnClick ="[Event Procedure]" - ControlTipText ="Requery the results set for the selected query" - - LayoutCachedLeft =12600 - LayoutCachedTop =3120 - LayoutCachedWidth =13620 - LayoutCachedHeight =3437 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - End - End - Begin Page - OverlapFlags =247 - Left =120 - Top =900 - Width =14160 - Height =10503 - Name ="pgDataTables" - Caption =" Browse data tables" - LayoutCachedLeft =120 - LayoutCachedTop =900 - LayoutCachedWidth =14280 - LayoutCachedHeight =11403 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =2 - WebImagePaddingBottom =2 - Begin - Begin ComboBox - LimitToList = NotDefault - SpecialEffect =2 - OverlapFlags =247 - IMESentenceMode =3 - ColumnCount =2 - ListRows =20 - ListWidth =11520 - Left =840 - Top =1050 - Width =4320 - Height =252 - BackColor =-2147483643 - BorderColor =0 - ForeColor =-2147483640 - ColumnInfo ="\"\";\"\";\"\";\"\";\"0\";\"0\"" - Name ="selTable" - RowSourceType ="Table/Query" - RowSource ="SELECT tsys_Link_Tables.Link_table, tsys_Link_Tables.Description_text FROM tsys_" - "Link_Tables WHERE (((tsys_Link_Tables.Link_table) Like \"tbl_*\" And (tsys_Link_" - "Tables.Link_table)<>\"tbl_QA_Results\")) OR (((tsys_Link_Tables.Link_table)=\"tl" - "u_Project_Crew\")) OR (((tsys_Link_Tables.Link_table)=\"tlu_Project_Taxa\")) OR " - "(((tsys_Link_Tables.Link_table)=\"tlu_Park_Taxa\")); " - ColumnWidths ="4320;7200" - AfterUpdate ="[Event Procedure]" - OnEnter ="[Event Procedure]" - - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =247 - TextAlign =0 - Left =180 - Top =1050 - Width =585 - Height =270 - BackColor =-2147483633 - BorderColor =0 - ForeColor =-2147483630 - Name ="labTable" - Caption ="Table:" - End - End - End - Begin Subform - Locked = NotDefault - OverlapFlags =247 - SpecialEffect =2 - Left =120 - Top =1698 - Width =14160 - Height =9705 - TabIndex =1 - BorderColor =0 - Name ="subDataTables" - - LayoutCachedLeft =120 - LayoutCachedTop =1698 - LayoutCachedWidth =14280 - LayoutCachedHeight =11403 - End - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =247 - TextAlign =0 - Left =5340 - Top =900 - Width =7716 - Height =699 - FontWeight =400 - BackColor =16777215 - BorderColor =0 - ForeColor =0 - Name ="labEditWarning" - Caption =" Warning: This is a last resort! If possible, open the records needing fixes w" - "ithin the data entry form. Also, when making manual edits in data tables, pleas" - "e be sure to update the updated_date and updated_by fields if they are present i" - "n the table." - ControlTipText ="View mode" - End - End - End - End - End - Begin CommandButton - FontItalic = NotDefault - OverlapFlags =85 - Left =13320 - Top =60 - Width =720 - Height =354 - TabIndex =1 - ForeColor =0 - Name ="cmdClose" - Caption ="Close" - OnClick ="[Event Procedure]" - ControlTipText ="Close the form" - - LayoutCachedLeft =13320 - LayoutCachedTop =60 - LayoutCachedWidth =14040 - LayoutCachedHeight =414 - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin OptionGroup - SpecialEffect =3 - OverlapFlags =85 - Left =10380 - Top =60 - Width =1914 - Height =355 - TabIndex =2 - BackColor =16777215 - BorderColor =0 - Name ="optgMode" - AfterUpdate ="[Event Procedure]" - DefaultValue ="0" - ControlTipText ="Change the form mode" - - LayoutCachedLeft =10380 - LayoutCachedTop =60 - LayoutCachedWidth =12294 - LayoutCachedHeight =415 - Begin - Begin OptionButton - SpecialEffect =2 - OverlapFlags =87 - BorderWidth =0 - Left =11460 - Top =144 - OptionValue =1 - BorderColor =0 - Name ="optEditMode" - - LayoutCachedLeft =11460 - LayoutCachedTop =144 - LayoutCachedWidth =11720 - LayoutCachedHeight =384 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =119 - TextAlign =0 - Left =11694 - Top =120 - Width =390 - Height =270 - BackColor =16777215 - BorderColor =0 - ForeColor =0 - Name ="labEditMode" - Caption ="Edit" - ControlTipText ="Edit mode" - LayoutCachedLeft =11694 - LayoutCachedTop =120 - LayoutCachedWidth =12084 - LayoutCachedHeight =390 - End - End - End - Begin OptionButton - SpecialEffect =2 - OverlapFlags =87 - BorderWidth =0 - Left =10500 - Top =150 - OptionValue =0 - BorderColor =0 - Name ="optViewMode" - - LayoutCachedLeft =10500 - LayoutCachedTop =150 - LayoutCachedWidth =10760 - LayoutCachedHeight =390 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =119 - TextAlign =0 - Left =10734 - Top =120 - Width =495 - Height =270 - BackColor =16777215 - BorderColor =0 - ForeColor =0 - Name ="labViewMode" - Caption ="View" - ControlTipText ="View mode" - LayoutCachedLeft =10734 - LayoutCachedTop =120 - LayoutCachedWidth =11229 - LayoutCachedHeight =390 - End - End - End - End - End - Begin OptionGroup - SpecialEffect =3 - OverlapFlags =85 - Left =5100 - Top =60 - Width =4800 - Height =355 - TabIndex =4 - BackColor =16777215 - BorderColor =0 - Name ="optgScope" - DefaultValue ="0" - ControlTipText ="Scope of the data included in the validation queries: uncertified events, certif" - "ied events, or both?" - - LayoutCachedLeft =5100 - LayoutCachedTop =60 - LayoutCachedWidth =9900 - LayoutCachedHeight =415 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =215 - TextAlign =0 - Left =5160 - Top =120 - Width =945 - Height =255 - FontWeight =400 - BackColor =13025979 - BorderColor =0 - ForeColor =0 - Name ="labIncludeCertified" - Caption ="Data scope:" - LayoutCachedLeft =5160 - LayoutCachedTop =120 - LayoutCachedWidth =6105 - LayoutCachedHeight =375 - End - Begin OptionButton - SpecialEffect =2 - OverlapFlags =87 - BorderWidth =0 - Left =6240 - Top =144 - OptionValue =0 - BorderColor =0 - Name ="optUncertOnly" - - LayoutCachedLeft =6240 - LayoutCachedTop =144 - LayoutCachedWidth =6500 - LayoutCachedHeight =384 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =119 - TextAlign =0 - Left =6480 - Top =120 - Width =1050 - Height =270 - BackColor =16777215 - BorderColor =0 - ForeColor =0 - Name ="labUncertOnly" - Caption ="Uncert. only" - ControlTipText ="Run queries only on uncertified events" - LayoutCachedLeft =6480 - LayoutCachedTop =120 - LayoutCachedWidth =7530 - LayoutCachedHeight =390 - End - End - End - Begin OptionButton - SpecialEffect =2 - OverlapFlags =87 - BorderWidth =0 - Left =7740 - Top =150 - OptionValue =1 - BorderColor =0 - Name ="optBoth" - - LayoutCachedLeft =7740 - LayoutCachedTop =150 - LayoutCachedWidth =8000 - LayoutCachedHeight =390 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =119 - TextAlign =0 - Left =7980 - Top =120 - Width =480 - Height =270 - BackColor =16777215 - BorderColor =0 - ForeColor =0 - Name ="labBoth" - Caption ="Both" - LayoutCachedLeft =7980 - LayoutCachedTop =120 - LayoutCachedWidth =8460 - LayoutCachedHeight =390 - End - End - End - Begin OptionButton - SpecialEffect =2 - OverlapFlags =87 - BorderWidth =0 - Left =8700 - Top =150 - OptionValue =2 - BorderColor =0 - Name ="optCertOnly" - - LayoutCachedLeft =8700 - LayoutCachedTop =150 - LayoutCachedWidth =8960 - LayoutCachedHeight =390 - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =119 - TextAlign =0 - Left =8940 - Top =120 - Width =870 - Height =270 - BackColor =16777215 - BorderColor =0 - ForeColor =0 - Name ="labCertOnly" - Caption ="Cert. only" - ControlTipText ="Run queries only on certified events" - LayoutCachedLeft =8940 - LayoutCachedTop =120 - LayoutCachedWidth =9810 - LayoutCachedHeight =390 - End - End - End - End - End - Begin ComboBox - LimitToList = NotDefault - TabStop = NotDefault - SpecialEffect =2 - OldBorderStyle =0 - OverlapFlags =85 - IMESentenceMode =3 - Left =2820 - Top =120 - Width =1620 - TabIndex =3 - BackColor =16777215 - BorderColor =0 - ForeColor =0 - ColumnInfo ="\"\";\"\";\"10\";\"510\"" - Name ="cmbTimeframe" - RowSourceType ="Table/Query" - RowSource ="SELECT [Forms]![frm_Switchboard]![cTimeframe] AS Timeframe FROM tbl_QA_Results " - "UNION SELECT tbl_QA_Results.Time_frame FROM tbl_QA_Results GROUP BY tbl_QA_Resul" - "ts.Time_frame ORDER BY Timeframe DESC;" - AfterUpdate ="[Event Procedure]" - - Begin - Begin Label - FontItalic = NotDefault - BackStyle =0 - OldBorderStyle =0 - OverlapFlags =85 - TextAlign =0 - Left =180 - Top =120 - Width =2520 - Height =255 - FontWeight =400 - BackColor =13025979 - BorderColor =0 - ForeColor =0 - Name ="labTime_frame" - Caption ="Time frame of data being certified:" - End - End - End - End - End - End -End -CodeBehindForm -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = True -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Compare Database -Option Explicit - -' ================================= -' FORM NAME: frm_QA_Tool -' Description: Standard form for data quality review and validation -' Data source: tbl_QA_Results -' Data access: edit only, no deletions; opens to allow additions until a query is -' selected, at which time additions are disallowed (see code in the subform) -' Pages: pgResults, pgQueryViews, pgDataTables -' Functions: fxnUpdateQAResults, fxnFilterRecords, fxnSetQueryFlag -' References: fxnChangeDelimiter, fxnSaveFile, fxnSwitchboardIsOpen, fxnTableExists -' Source/date: John R. Boetsch, Jan 2006 -' Adapted/date: Bonnie L. Campbell, June 3, 2014 -' Revisions: JRB, May 16, 2006 - updated to use a subform for results, added conditional -' formatting and sort capability, and improved documentation -' JRB, June 20, 2006 - added a button on pgResults to open the selected record -' in the data entry forms to maximize quality control during record fixes -' JRB, 8/2/2006 - added additional error trapping to cmdOpenRecord -' JRB, 10/5/2006 - fixed a problem with the refresh button giving a copy/save -' error message by saving the current record and turning off the form filter; -' added timeframe to fxnUpdateQAResults, and updated to save record before -' running the qa report -' JRB, 11/14/2007 - revised the description and code in fxnUpdateQAResults -' JRB, 12/17/2007 - added selTable_Enter to restore table pick list functionality -' regardless of back end in Access or SQL Server; added PageTabs change -' code to update and bookmark the last-selected subform record upon -' moving back to the first page; added code to handle multiple possible -' data time frames by adding an unbound ctl and linking the subform to this; -' added code to the results set report to also filter on data time frame; -' also added code to allow the user to flag records using the Is_done field -' JRB, May 2008 - updated documentation -' JRB, 6/18/2008 - updated Form_Open to check switchboard and enable/disable -' functionality based on application mode -' JRB, 7/1/2008 - updated by adding blnRunQueries; added filter capability for -' Is_done and query type; added fxnFilterRecords -' JRB, 9/17/2008 - added ref to frm_Progress_Meter (progress meter popup) in -' fxnUpdateQAResults -' JRB, 9/19/2008 - added optgScope; changed txtTime_frame to cmbTimeframe; -' updated fxnUpdateQAResults to reflect both changes; updated call to -' rpt_QA_Results -' JRB, 11/21/2008 - added txtEditQuery and fxnSetQueryFlag; updated to lock -' subQueryResults except when the query is named in a way that indicates -' its results are editable; updated cmdOpenRecord; updated cmdViewReport; -' added error traps to selObject and cmdDesignView; fixed a bug with opening -' the report and changing the filter values -' JRB, 1/13/2009 - added save record to PageTabs_Change (copy/edit error) -' JRB, 2/23/2009 - added cmdOpenBrowser; fixed a bug in selObject_AfterUpdate and -' updated fxnUpdateQAResults -' JRB, 3/27/2009 - added cmdExport to allow quick results export to Excel -' JRB, 5/1/2009 - updated cmdOpenBrowser to turn browser filters off by default; -' updated cmdExport_Click to default to current application path -' JRB, 5/22/2009 - updated fxnFilterRecords -' JRB, 6/10/2009 - updated cmdViewReport, cmdExport, fxnUpdateQAResults -' JRB, 7/9/2009 - updated selTable to rely on tsys_Link_Tables, if present -' JRB, 11/3/2009 - added cmdAutoFix and fxnEnableAutoFix -' JRB, 2/8/2010 - updated fxnSetQueryFlag -' JRB, 6/6/2011 - fixed a minor glitch by adding a call to fxnFilterRecords -' within PageTabs_Change (the front page filters were being ignored) -' JRB, 1/31/2013 - resized panes, added cmdCloseup; set to use login rather than -' rely on session default user for Form_Dirty -' -------------------------------------------------------------------------------------- -' BLC, 6/3/2014 - Adapted for NCPN WQ Utilities tool -' BLC, 6/16/2014 - Updated to use TempVars.Item("UserAccessLevel") vs. cAppMode -' BLC, 6/16/2014 - Modified to pull queries from tsys_Db_Templates -' BLC, 8/22/2014 - Shifted blnRunQueries to mod_User & extended to project scope -' since used in setUserAccess (Dim -> Public), shifted fxnUpdateQAResults to mod_QA & -' renamed UpdateQAResults -' ================================= - -' --------------------------------- -' SUB: Form_Open -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/16/2014 - Updated to use TempVars.Item("UserAccessLevel") vs. cAppMode -' BLC, 7/29/2014 - updated to use TempVars.Item("Timeframe") vs. cTimeframe -' BLC, 8/22/2014 - Shifted user access level dictated field settings to setUserAccess -' --------------------------------- -Private Sub Form_Open(Cancel As Integer) - On Error GoTo Err_Handler - - ' Close the form if the switchboard is not open - If SwitchboardIsOpen = False Then - MsgBox "The main database switchboard must be" & vbCrLf & _ - "open for this form to function properly.", , "Cannot open the form ..." - DoCmd.CancelEvent - GoTo Exit_Procedure - End If - - 'set default app mode & initialize controls - setUserAccess Me - - ' Initialize UI - With Me - ' Set form time frame to global time frame - .cmbTimeframe = TempVars.item("Timeframe") - - .cmbDoneFilter = "False" - .togFilterByDone = True - End With - fxnFilterRecords - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: Form_Load -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub Form_Load() - On Error GoTo Err_Handler - - ' Requery the results subform to reflect updates if the user chose to run upon opening - If blnRunQueries Then Me.subResults.Requery - ' Turn off the form filter and move to a blank record so that no query record is visible - Me.Filter = "" - DoCmd.GoToRecord , , acNewRec - -Exit_Procedure: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case 2105 ' Someone saved the form as not allowing new records - MsgBox "The form has been saved in a manner that does not permit new" & _ - vbCrLf & "records to be added. Contact the database administrator.", _ - vbOKOnly, "Form saved in wrong mode (QA Tool Load Error)" - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - End Select - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmbTimeframe_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/16/2014 - Updated to use TempVars.Item("UserAccessLevel") vs. cAppMode -' BLC, 7/29/2014 - updated to use TempVars.Item("Timeframe") vs. cTimeframe -' --------------------------------- -Private Sub cmbTimeframe_AfterUpdate() - On Error GoTo Err_Handler - - If Me.cmbTimeframe <> TempVars.item("Timeframe") Then - Me.cmdRefresh.Enabled = False - Me.optgMode.Enabled = False - Else - Select Case TempVars.item("UserAccessLevel") - Case "admin", "power user" - Me.cmdRefresh.Enabled = True - Me.optgMode.Enabled = True - Case "data entry" - Me.cmdRefresh.Enabled = True - Me.optgMode.Enabled = False - Case Else - ' leave them as is - End Select - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: PageTabs_Change -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 8/22/2014 - updated UpdateQAResults function name -' --------------------------------- -Private Sub PageTabs_Change() - On Error GoTo Err_Handler - - Dim rst As DAO.Recordset - Dim strCriteria As String - Dim varReturn As Variant - - ' Bail out if the refresh button is disabled (app mode or if selected timeframe <> - ' db timeframe) - If Me.cmdRefresh.Enabled = False Then GoTo Exit_Procedure - - ' If moving to the first page, and if a specific query record has been selected - ' move the subform bookmark to the currently-selected record - If Me.PageTabs = 0 And IsNull(Me.selObject) = False Then - ' Save the current record, reset the form filter and query selector, reset the form - ' to allow additions, and move to a blank record - If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord - - ' Run the function to update the current QA query record - varReturn = UpdateQAResults(False, Me.selObject) - Me.Requery - fxnFilterRecords - strCriteria = "[Query_name] = """ & Me.selObject.Value & _ - """ AND [Time_frame] = """ & Me.cmbTimeframe & _ - """ AND [Data_scope] = " & Me.optgScope - - Set rst = Me.subResults.Form.RecordsetClone - rst.FindFirst strCriteria - If rst.NoMatch Then - 'MsgBox "No entry found.", vbInformation - Else - Me.subResults.Form.Bookmark = rst.Bookmark - End If - ElseIf Me.PageTabs = 1 And IsNull(Me.selObject) = False Then - ' Call the function to update the query flag - fxnSetQueryFlag - fxnEnableAutoFix - End If - -Exit_Procedure: - On Error Resume Next - rst.Close - Set rst = Nothing - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: optgMode_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub optgMode_AfterUpdate() - On Error GoTo Err_Handler - - ' Change the subform data mode depending on the user choice - If Me.optgMode = 0 Then - ' View mode - Me.subQueryResults.Locked = True - Me.txtUser.Locked = True - Me.txtQueryDesc.Locked = True - Me.txtRemedy.Locked = True - Me.subDataTables.Locked = True - Me.Detail.BackColor = 13025979 ' steel blue (default) - Else - ' Edit mode - ' Unlock the subform if an editable query - If Me.txtEditQuery = "OK" Then Me.subQueryResults.Locked = False _ - Else Me.subQueryResults.Locked = True - Me.txtUser.Locked = False - Me.txtQueryDesc.Locked = False - Me.txtRemedy.Locked = False - Me.subDataTables.Locked = False - Me.Detail.BackColor = 12574431 ' haystack - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmbTypeFilter_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub cmbTypeFilter_AfterUpdate() - On Error GoTo Err_Handler - - Me.togFilterByType = Not IsNull(Me.cmbTypeFilter) - fxnFilterRecords - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: togFilterByType_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub togFilterByType_AfterUpdate() - On Error GoTo Err_Handler - - If IsNull(Me.cmbTypeFilter) = False Then fxnFilterRecords Else Me.togFilterByType = False - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmbDoneFilter_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub cmbDoneFilter_AfterUpdate() - On Error GoTo Err_Handler - - Me.togFilterByDone = Not IsNull(Me.cmbDoneFilter) - fxnFilterRecords - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: togFilterByDone_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub togFilterByDone_AfterUpdate() - On Error GoTo Err_Handler - - If IsNull(Me.cmbDoneFilter) = False Then fxnFilterRecords Else Me.togFilterByDone = False - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: Form_Dirty -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub Form_Dirty(Cancel As Integer) - On Error GoTo Err_Handler - - ' Note: this event is ignored on inserting a new record if BeforeInsert code exists - - ' Bail out if the refresh button is disabled (app mode or if selected timeframe <> - ' db timeframe) - If Me.cmdRefresh.Enabled = False Then GoTo Exit_Procedure - - ' Bail out if no object record is selected - keeps from adding bogus new records - If IsNull(Me.selObject) Then - DoCmd.CancelEvent - GoTo Exit_Procedure - End If - - ' Once a user starts to make edits in the record, update the user field - ' on the results summary page - If SwitchboardIsOpen Then Me.txtUser = Environ("Username") - Me.txtRemedy_date = Now() - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdClose_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub cmdClose_Click() - On Error GoTo Err_Handler - - DoCmd.Close , , acSaveNo - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' ================================= -' PAGE NAME: QA Results Summary Page (pgResults) -' Description: shows an overview of validation query results -' Unbound ctls: none -' Subforms: subResults - subform for showing the results summaries -' ================================= - -' --------------------------------- -' SUB: cmdRefresh_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - initial version -' BLC, 8/25/2014 - updated UpdateQAResults function name (dropped fxn prefix) -' --------------------------------- -Private Sub cmdRefresh_Click() - On Error GoTo Err_Handler - - ' Save the current record, reset the form filter and query selector, reset the form - ' to allow additions, and move to a blank record - If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord - Me.Filter = "" - Me.FilterOn = False - Me.selObject = Null - Me.subQueryResults.SourceObject = "" - Me.AllowAdditions = True - DoCmd.GoToRecord , , acNewRec - - ' Set the form to view mode and call the event procedure for the form mode ctl - Me.optgMode = 0 - optgMode_AfterUpdate - Me.Repaint - - ' Refresh the validation query results (filtering requeries the subform) - UpdateQAResults - fxnFilterRecords - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdViewReport_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub cmdViewReport_Click() - On Error GoTo Err_Handler - - ' Generate the QA report - Dim strRptName As String - Dim strMsg As String - Dim strFilter As String - Dim strTimeframe As String - Dim strScope As String - Dim strInitFile As String - Dim strSaveFile As String - Dim varResponse As VbMsgBoxResult - - strRptName = "rpt_QA_Results" - - strMsg = "This will open the quality assurance report ..." & vbCrLf & vbCrLf & _ - "Would you like to limit report results to " & Me.cmbTimeframe & "?" - varResponse = MsgBox(strMsg, vbYesNoCancel, "Quality assurance report") - - Select Case varResponse - Case vbCancel - GoTo Exit_Procedure - Case vbYes - strTimeframe = Me.cmbTimeframe - strFilter = "[Time_frame]=""" & strTimeframe & """" - Case Else - strTimeframe = Trim(InputBox("Enter the time frame to filter by" & vbCrLf & _ - "(or leave blank to show all):", "Filter by data time frame", _ - Me.cmbTimeframe)) - If strTimeframe <> "" Then - strFilter = "[Time_frame]=""" & strTimeframe & """" - Else - strFilter = "" - End If - End Select - - ' Save the current record so that all changes are reflected in the report - If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord - - Select Case Me.optgScope - Case 0 - strScope = "Uncertifed event data only" - Case 1 - strScope = "Both certified and uncertified events" - Case 2 - strScope = "Certified event data only" - End Select - - If MsgBox("Would you like to filter by the current data scope?" & _ - vbCrLf & vbCrLf & " " & strScope, vbYesNo, "Filter by data scope?") = vbYes Then - If strFilter <> "" Then strFilter = strFilter & " AND " - strFilter = strFilter & "[Data_scope]=" & Me.optgScope - End If - - ' Open the formatted report output, filtering on time frame - DoCmd.OpenReport "rpt_QA_Results", acViewPreview, , strFilter - If MsgBox("Would you like to save this report?", vbYesNo + vbDefaultButton2, _ - "Save report to a file?") = vbYes Then - If strTimeframe <> "" Then - ' Add timeframe to file name - strInitFile = Application.CurrentProject.Path & "\" & strRptName & "_" & _ - strTimeframe & "_" & CStr(Format(Now(), "yyyymmdd_hhnnss")) & ".snp" - Else - strInitFile = Application.CurrentProject.Path & "\" & strRptName & "_" & _ - CStr(Format(Now(), "yyyymmdd_hhnnss")) & ".snp" - End If - ' Open the save file dialog and update to the actual name given by the user - strSaveFile = SaveFile(strInitFile, "Snapshot Viewer (*.snp)", "*.snp") - DoCmd.OutputTo acOutputReport, strRptName, acFormatSNP, strSaveFile, True - MsgBox "File saved to:" & vbCrLf & vbCrLf & strSaveFile - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case 94, 2001 - ' User canceled dialog box - do nothing - Case 2501 - ' Canceled open report action - do nothing - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - End Select - Resume Exit_Procedure - -End Sub - -' ================================= -' PAGE NAME: Query Results Page (pgQueryViews) -' Description: shows records returned by individual QA queries, provides the -' user the opportunity to fix these -' Unbound ctls: selObject - combo box for selecting the query object by name -' Subforms: subQueryResults - subform showing results of the selected query -' ================================= - -' --------------------------------- -' SUB: selObject_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 8/22/2014 - updated UpdateQAResults function name -' --------------------------------- -Private Sub selObject_AfterUpdate() - On Error GoTo Err_Handler - - Dim strCriteria As String - Dim varReturn As Variant - - ' Bail out if the refresh button is disabled (app mode or if selected timeframe <> - ' db timeframe) - If Me.cmdRefresh.Enabled = False Then GoTo Exit_Procedure - - ' Exit if no query selected - If IsNull(Me.selObject) Then - MsgBox "Please pick from the list", vbOKOnly, "No Query Selected" - Me.AllowAdditions = True - DoCmd.GoToRecord , , acNewRec - Me.txtEditQuery = "" - Me.txtEditQuery.ForeColor = 0 'black - Me.txtEditQuery.BackColor = 8454143 'yellow - GoTo Exit_Procedure - End If - - ' Bind the subform to the selected query - Me.subQueryResults.SourceObject = "Query." & Me.selObject.Value - ' Build the filter string and see if a record already exists - strCriteria = "[Query_name] = """ & Me.selObject.Value & _ - """ AND [Time_frame] = """ & Me.cmbTimeframe & _ - """ AND [Data_scope] = " & Me.optgScope - If DCount("*", "tbl_QA_Results", strCriteria) = 0 Then - ' Run the function to update the current QA query record - varReturn = UpdateQAResults(False, Me.selObject, True) - End If - ' Set the form to the selected record - Me.Form.Filter = strCriteria - Me.Form.FilterOn = True - - ' Call the function to update the query flag - fxnSetQueryFlag - fxnEnableAutoFix - - Dim qdf As DAO.QueryDef - Dim qdfs As DAO.QueryDefs - Set qdfs = DBEngine(0)(0).QueryDefs - - On Error Resume Next - For Each qdf In qdfs - If qdf.Name = Me.selObject.Value Then - MsgBox ("This query returns (" & DCount("*", qdf.Name) & _ - ") records that meet the following criteria: " & _ - vbCrLf & vbCrLf & qdf.Properties("Description")) - End If - Next qdf - -Exit_Procedure: - On Error Resume Next - Set qdfs = Nothing - Exit Sub - -Err_Handler: - Select Case Err.Number - Case 3011, 7874 ' Object not found - MsgBox "This query is no longer available in the application." & _ - vbCrLf & """" & Me.selObject & """", , "Query not found" - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - End Select - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdDesignView_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub cmdDesignView_Click() - On Error GoTo Err_Handler - - ' Open the selected query in design view after checking that a query is selected - If IsNull(Me.selObject) = False Then _ - DoCmd.OpenQuery Me.selObject.Value, acViewDesign, acReadOnly - -Exit_Procedure: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case 3011, 7874 ' Object not found - MsgBox "This query is no longer available in the application." & _ - vbCrLf & """" & Me.selObject & """", , "Query not found" - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - End Select - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdAutoFix_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub cmdAutoFix_Click() - On Error GoTo Err_Handler - - Dim ctlAutoFix As Control - Dim varAutoFix As Variant - - varAutoFix = Null - - On Error Resume Next - Set ctlAutoFix = Forms!frm_QA_Tool.subQueryResults!varAutoFix - varAutoFix = ctlAutoFix.Value - On Error GoTo Err_Handler - - If IsNull(varAutoFix) Then - MsgBox "There are no records selected, or no query is specified to fix the results." - ElseIf Left(varAutoFix, 1) = "t" Then - ' Object is a table - open in the next tab - MsgBox "Object is not labeled as a query:" & vbCrLf & vbCrLf & _ - " " & varAutoFix, , "No action taken" - ElseIf Left(varAutoFix, 1) = "q" Then - ' Object is a query - open on its own - Dim qdf As DAO.QueryDef - Dim qdfs As DAO.QueryDefs - Set qdfs = DBEngine(0)(0).QueryDefs - On Error Resume Next - For Each qdf In qdfs - If qdf.Name = varAutoFix Then - If MsgBox("This will open/run the following query:" & vbCrLf & vbCrLf & _ - """" & varAutoFix & """" & vbCrLf & vbCrLf & qdf.Properties("Description"), _ - vbOKCancel, "Open or run query ...") = vbCancel Then - GoTo Exit_Procedure - End If - End If - Next qdf - DoCmd.OpenQuery varAutoFix - Me.subQueryResults.Requery - End If - -Exit_Procedure: - On Error Resume Next - Set ctlAutoFix = Nothing - Set qdfs = Nothing - Exit Sub - -Err_Handler: - Select Case Err.Number - Case 2427 ' No records in the subform - ' Do nothing ... - Case 2465 ' Needed field is not present in the record set - MsgBox "No form is specified for fixing these results", , "Missing query field" - Case 2467 ' No subform recordset - MsgBox "No query result set" - Case 3011, 7874 ' Object not found - MsgBox "The table, query or form is no longer available in the application.", , _ - "Object not found" - Case Else - MsgBox Err.Number & ": " & Err.Description - End Select - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdOpenRecord_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub cmdOpenRecord_Click() - On Error GoTo Err_Handler - - ' Opens the selected subform record in the object specified in the query - ' to make use of quality control features of the front end during edits - - Dim ctlObject As Control - Dim ctlFilter As Control - Dim ctlArgs As Control - Dim varObject As Variant - Dim varFilter As Variant - Dim varArgs As Variant - - varObject = Null - varFilter = Null - varArgs = Null - - On Error Resume Next - Set ctlObject = Forms!frm_QA_Tool.subQueryResults!varObject - varObject = ctlObject.Value - Set ctlFilter = Forms!frm_QA_Tool.subQueryResults!varFilter - varFilter = ctlFilter.Value - Set ctlArgs = Forms!frm_QA_Tool.subQueryResults!varArgs - varArgs = ctlArgs.Value - On Error GoTo Err_Handler - - If IsNull(varObject) Then - MsgBox "There are no records selected, or no form is specified." - ElseIf Left(varObject, 1) = "t" Then - ' Object is a table - open in the next tab - Me.subDataTables.SourceObject = "Table." & varObject - Me.selTable = varObject - Me.pgDataTables.SetFocus - ElseIf Left(varObject, 1) = "q" Then - ' Object is a query - open on its own - Dim qdf As DAO.QueryDef - Dim qdfs As DAO.QueryDefs - Set qdfs = DBEngine(0)(0).QueryDefs - On Error Resume Next - For Each qdf In qdfs - If qdf.Name = varObject Then - If MsgBox("This will open/run the following query:" & vbCrLf & vbCrLf & _ - """" & varObject & """" & vbCrLf & vbCrLf & qdf.Properties("Description"), _ - vbOKCancel, "Open or run query ...") = vbCancel Then - GoTo Exit_Procedure - End If - End If - Next qdf - DoCmd.OpenQuery varObject - Me.subQueryResults.Requery - ElseIf IsNull(varFilter) Then - ' Filter by form alone if no filter - Select Case varObject - Case "frm_Contacts" - Set gvarRefContactCtl = Me.subQueryResults - Case "fsub_Project_Taxa" - Set gvarRefTaxonCtl = Me.subQueryResults - Case Else - Set gvarRefForm = Me.Form - Set gvarRefCtl = Me.subQueryResults - End Select - DoCmd.OpenForm varObject, , , , , , varArgs - Else - ' Filter by form and filter - Select Case varObject - Case "frm_Contacts" - Set gvarRefContactCtl = Me.subQueryResults - Case "fsub_Project_Taxa" - Set gvarRefTaxonCtl = Me.subQueryResults - Case Else - Set gvarRefForm = Me.Form - Set gvarRefCtl = Me.subQueryResults - End Select - DoCmd.OpenForm varObject, , , varFilter, , , varArgs - End If - -Exit_Procedure: - On Error Resume Next - Set ctlArgs = Nothing - Set ctlFilter = Nothing - Set ctlObject = Nothing - Set qdfs = Nothing - Exit Sub - -Err_Handler: - Select Case Err.Number - Case 2427 ' No records in the subform - ' Do nothing ... - Case 2465 ' Needed field is not present in the record set - MsgBox "No form is specified for fixing these results", , "Missing query field" - Case 2467 ' No subform recordset - MsgBox "No query result set" - Case 3011, 7874 ' Object not found - MsgBox "The table, query or form is no longer available in the application.", , _ - "Object not found" - Case Else - MsgBox Err.Number & ": " & Err.Description - End Select - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdOpenBrowser_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub cmdOpenBrowser_Click() - On Error GoTo Err_Handler - - Set gvarRefForm = Me.Form - Set gvarRefCtl = Me.subQueryResults - ' Open to a blank record - to distinguish from opening to the selected record in the subform - DoCmd.OpenForm "frm_Data_Browser", , , , acFormAdd, , "off" - -Exit_Procedure: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case 3011, 7874 ' Object not found - MsgBox "The table, query or form is no longer available in the application.", , _ - "Object not found" - Case Else - MsgBox Err.Number & ": " & Err.Description - End Select - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdExport_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub cmdExport_Click() - On Error GoTo Err_Handler - - Dim strQName As String - Dim strSaveFile As String - - ' Bail out if no query is currently selected - If IsNull(Me.selObject) Then GoTo Exit_Procedure - ' Requery the selected record in the recordset, and update the subform - Me.subQueryResults.Requery - strQName = Me.selObject - strSaveFile = CurrentProject.Path & "\" & strQName & "_" & _ - CStr(Format(Now(), "yyyymmdd_hhnnss")) & ".xls" - DoCmd.OutputTo acOutputQuery, strQName, acFormatXLS, strSaveFile, True - MsgBox "File saved to:" & vbCrLf & vbCrLf & strSaveFile - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdCloseup_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub cmdCloseup_Click() - On Error GoTo Err_Handler - - ' Open the selected query in a new window after checking that a query is selected - If IsNull(Me.selObject) = False Then - If Me.txtEditQuery = "OK" Then - DoCmd.OpenQuery Me.selObject.Value, acViewNormal, acEdit - Else - DoCmd.OpenQuery Me.selObject.Value, acViewNormal, acReadOnly - End If - DoCmd.Maximize - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case 3011, 7874 ' Object not found - MsgBox "This query is not found in the application:" & _ - vbCrLf & """" & Me.selObject & """", , "Object not found" - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - End Select - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdRequery_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub cmdRequery_Click() - On Error GoTo Err_Handler - - 'Dim varReturn As Variant - - ' Bail out if no query is currently selected - If IsNull(Me.selObject) Then GoTo Exit_Procedure - ' Requery the selected record in the recordset, and update the subform - Me.subQueryResults.Requery - ' Run the function to update the current QA query record - commented out because this - ' is done upon changing page tabs - 'varReturn = fxnUpdateQAResults(False, Me.selObject) - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: txtUser_Dirty -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub txtUser_Dirty(Cancel As Integer) - On Error GoTo Err_Handler - - ' Prompt user to confirm before allowing edits in the QA user control - If MsgBox("Are you sure you want to change the user name?", _ - vbYesNo, "Please confirm ...") = vbNo Then - DoCmd.CancelEvent - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: txtQueryDesc_Dirty -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub txtQueryDesc_Dirty(Cancel As Integer) - On Error GoTo Err_Handler - - ' Prompt user to confirm before allowing edits in query definition control - If MsgBox("Are you sure you want to change the query definition?", _ - vbYesNo, "Please confirm ...") = vbNo Then - DoCmd.CancelEvent - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' ================================= -' PAGE NAME: Data Tables Page (pgDataTables) -' Description: allows the user to select and view the contents of individual data -' tables to make data revisions -' Unbound ctls: selTable - combo box for selecting the table object by name -' Subforms: subDataTables - subform showing the contents of the selected table -' ================================= - -' --------------------------------- -' SUB: selTable_Enter -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub selTable_Enter() - On Error GoTo Err_Handler - - Dim strSysTable As String - - strSysTable = "tsys_Link_Tables" ' System table listing linked tables - - ' If the system table does not exist, replace the row source with one that doesn't use it - If TableExists(strSysTable) = False Then - Me.selTable.RowSource = "SELECT MSysObjects.Name " & _ - "FROM MSysObjects " & _ - "WHERE (((MSysObjects.Name) Like 'tbl_*' " & _ - "And (MSysObjects.Name)<>'tbl_QA_Results')) " & _ - "OR (((MSysObjects.Name)='tlu_Project_Crew')) " & _ - "OR (((MSysObjects.Name)='tlu_Project_Taxa')) " & _ - "OR (((MSysObjects.Name)='tlu_Park_Taxa'));" - Me.selTable.ColumnCount = 1 - Me.selTable.ListWidth = Me.selTable.Width - Me.selTable.Requery - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: selTable_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub selTable_AfterUpdate() - On Error GoTo Err_Handler - - ' Once a table is selected, bind the subform to this table - If IsNull(Me.selTable) Then - ' If none selected ... - Me.subDataTables.SourceObject = "" - Else - ' If a table is selected ... - If TableExists(Me.selTable) Then - Me.subDataTables.SourceObject = "Table." & Me.selTable.Value - Else - MsgBox "Unable to find the selected table in the database ...", , _ - "Table not found" - End If - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' FUNCTION: fxnFilterRecords -' Description: Filter the records by the indicated field -' Parameters: none -' Returns: none -' Throws: none -' References: none -' Source/date: John R. Boetsch, May 5, 2006 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: JRB, May 2008 - made code more robust and error-proof -' JRB, 7/1/2008 - updated by filtering on the subform rather than the form -' JRB, 5/22/2009 - updated filter AND clauses -' --------------------------------- -Private Function fxnFilterRecords() - On Error GoTo Err_Handler - - Dim strFilter As String - Dim bFilterOn As Boolean - - bFilterOn = False - strFilter = "" - - ' Save the record (to trigger validation) - If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord - - If Me.togFilterByType Then - bFilterOn = True - strFilter = strFilter & "[Query_type] = """ & Me.cmbTypeFilter & """" - End If - If Me.togFilterByDone Then - If bFilterOn Then strFilter = strFilter & " AND " - bFilterOn = True - strFilter = strFilter & "[Is_done] = " & Me.cmbDoneFilter & "" - End If - - ' Apply the filter - 'Me.Filter = strFilter - 'Me.FilterOn = bFilterOn - Me.subResults.Form.Filter = strFilter - Me.subResults.Form.FilterOn = bFilterOn - - ' Make the labels bold or not depending on filter settings - Me.labTypeFilter.fontBold = Me.togFilterByType - Me.labDoneFilter.fontBold = Me.togFilterByDone - -Exit_Procedure: - Exit Function - -Err_Handler: - Select Case Err.Number - Case 2001 ' Run time canceled event (validation error) - do nothing - Me.togFilterByType = False - Me.togFilterByDone = False - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - fxnFilterRecords)" - End Select - Resume Exit_Procedure - -End Function - -' --------------------------------- -' FUNCTION: fxnSetQueryFlag -' Description: Updates the flag to indicate whether or not the query results are editable -' Parameters: none -' Returns: none -' Throws: none -' References: none -' Source/date: John R. Boetsch, 10/7/2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: JRB, 2/8/2010 - updated flag from "X" to "_X" in of x as last letter in name -' --------------------------------- -Private Function fxnSetQueryFlag() - On Error GoTo Err_Handler - - ' Update the visual flag to indicate whether or not the query results are editable - ' Note: suffix of "_X" means that the query results may be edited - If Right(Me.selObject.Value, 2) = "_X" Then - Me.txtEditQuery = "OK" - Me.txtEditQuery.ForeColor = 16777215 'white - Me.txtEditQuery.BackColor = 4227072 'green - ' Unlock the subform if in edit mode - If Me.optgMode = 1 Then Me.subQueryResults.Locked = False _ - Else Me.subQueryResults.Locked = True - Else - Me.txtEditQuery = "No" - Me.txtEditQuery.ForeColor = 16777215 'white - Me.txtEditQuery.BackColor = 255 'red - ' Lock the subform - Me.subQueryResults.Locked = True - End If - -Exit_Procedure: - Exit Function - -Err_Handler: - Select Case Err.Number - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - fxnSetQueryFlag)" - End Select - Resume Exit_Procedure - -End Function - -' --------------------------------- -' FUNCTION: fxnEnableAutoFix -' Description: Enables or disables the control for running an action query to fix records -' Parameters: none -' Returns: none -' Throws: none -' References: none -' Source/date: John R. Boetsch, 11/3/2009 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/16/2014 - Updated to use TempVars.Item("UserAccessLevel") vs. cAppMode -' --------------------------------- -Private Function fxnEnableAutoFix() - On Error GoTo Err_Handler - - Dim ctlAutoFix As Control - - Me.cmdAutoFix.Enabled = False - - ' The following looks for 'varAutoFix' field in the query results ... - ' If it isn't there, it will throw a trapped error and the ctl will remain disabled - Set ctlAutoFix = Forms!frm_QA_Tool.subQueryResults!varAutoFix - - ' If no error, the field is there ... enable the ctl if user has sufficient rights - Select Case TempVars.item("UserAccessLevel") - Case "admin", "power user" - Me.cmdAutoFix.Enabled = True - End Select - -Exit_Procedure: - On Error Resume Next - Set ctlAutoFix = Nothing - Exit Function - -Err_Handler: - Select Case Err.Number - Case 2465, 2467 - ' Do nothing ... - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - fxnEnableAutoFix)" - End Select - Resume Exit_Procedure - -End Function diff --git a/source/forms/_frm_Set_Db_Info.bas b/source/forms/_frm_Set_Db_Info.bas deleted file mode 100644 index 0773c6e..0000000 --- a/source/forms/_frm_Set_Db_Info.bas +++ /dev/null @@ -1,560 +0,0 @@ -Version =20 -VersionRequired =20 -Begin Form - AllowFilters = NotDefault - PopUp = NotDefault - Modal = NotDefault - RecordSelectors = NotDefault - MaxButton = NotDefault - MinButton = NotDefault - AutoCenter = NotDefault - NavigationButtons = NotDefault - AllowDeletions = NotDefault - DividingLines = NotDefault - AllowAdditions = NotDefault - DefaultView =0 - ScrollBars =0 - ViewsAllowed =1 - TabularFamily =0 - BorderStyle =1 - PictureAlignment =2 - DatasheetGridlinesBehavior =3 - Cycle =1 - GridX =24 - GridY =24 - Width =5520 - DatasheetFontHeight =10 - ItemSuffix =14 - Left =4665 - Top =3315 - Right =12315 - Bottom =14310 - DatasheetGridlinesColor =12632256 - RecSrcDt = Begin - 0x99f562689172e440 - End - RecordSource ="tsys_App_Releases" - Caption ="Set Application Version Info" - OnOpen ="[Event Procedure]" - DatasheetFontName ="Arial" - PrtMip = Begin - 0xa0050000a0050000a0050000a005000000000000201c0000e010000001000000 , - 0x010000006801000000000000a10700000100000001000000 - End - AllowDatasheetView =0 - AllowPivotTableView =0 - AllowPivotChartView =0 - AllowPivotChartView =0 - FilterOnLoad =0 - AllowLayoutView =0 - DatasheetGridlinesColor12 =12632256 - Begin - Begin Label - BackStyle =0 - FontName ="Tahoma" - End - Begin Rectangle - SpecialEffect =3 - BackStyle =0 - BorderLineStyle =0 - End - Begin CommandButton - FontSize =8 - FontWeight =400 - ForeColor =-2147483630 - FontName ="Tahoma" - BorderLineStyle =0 - End - Begin TextBox - FELineBreak = NotDefault - SpecialEffect =2 - OldBorderStyle =0 - BorderLineStyle =0 - FontName ="Tahoma" - AsianLineBreak =255 - End - Begin ComboBox - SpecialEffect =2 - BorderLineStyle =0 - FontName ="Tahoma" - End - Begin Section - Height =3840 - BackColor =14341081 - Name ="Detail" - Begin - Begin ComboBox - LimitToList = NotDefault - AllowAutoCorrect = NotDefault - OldBorderStyle =0 - OverlapFlags =85 - IMESentenceMode =3 - ColumnCount =4 - ListRows =20 - ListWidth =8640 - Left =1320 - Top =720 - Width =3900 - Height =252 - FontSize =9 - TabIndex =1 - ColumnInfo ="\"\";\"\";\"\";\"\";\"\";\"\";\"\";\"\";\"10\";\"0\"" - Name ="cbxVersion" - RowSourceType ="Table/Query" - RowSource ="SELECT tsys_App_Releases.Release_ID, 'Version ' & [Version_number] & ' (' & [Rel" - "ease_date] & ')' AS Version, IIf([Is_supported]=0,'Not supported',IIf([Is_suppor" - "ted]=1,'Supported','Current')) AS Supported, tsys_App_Releases.Database_title FR" - "OM tsys_App_Releases ORDER BY tsys_App_Releases.Release_date DESC; " - ColumnWidths ="0;2880;1440;4320" - StatusBarText ="Set the current application version" - DefaultValue ="=[Forms]![frm_Switchboard]![cmbVersion]" - FontName ="Arial" - OnGotFocus ="[Event Procedure]" - OnNotInList ="[Event Procedure]" - ControlTipText ="Set the current application version" - - Begin - Begin Label - OverlapFlags =85 - Left =120 - Top =720 - Width =1065 - Height =255 - FontSize =9 - FontWeight =700 - BackColor =11056034 - Name ="lblVersion" - Caption ="Db version: " - FontName ="Arial" - End - End - End - Begin CommandButton - OverlapFlags =85 - Left =4380 - Top =120 - Width =720 - Height =354 - FontSize =9 - FontWeight =700 - ForeColor =0 - Name ="cmdOK" - Caption ="OK" - OnClick ="[Event Procedure]" - FontName ="Arial" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin TextBox - TabStop = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =1860 - Top =1200 - Width =2694 - Height =252 - FontSize =9 - TabIndex =2 - Name ="tbxContactName" - StatusBarText ="Enter the developer contact name for the application" - FontName ="Arial" - ControlTipText ="Enter the developer contact name for the application" - - Begin - Begin Label - OverlapFlags =85 - Left =480 - Top =1200 - Width =1305 - Height =255 - FontSize =9 - FontWeight =700 - BackColor =11056034 - Name ="lblContactName" - Caption ="Contact name:" - FontName ="Arial" - End - End - End - Begin TextBox - TabStop = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =1860 - Top =1560 - Width =2700 - Height =252 - FontSize =9 - TabIndex =3 - Name ="tbxContactOrg" - StatusBarText ="Enter the contact organization for the application" - FontName ="Arial" - ControlTipText ="Enter the contact organization for the application" - - Begin - Begin Label - OverlapFlags =85 - Left =480 - Top =1560 - Width =1257 - Height =252 - FontSize =9 - FontWeight =700 - BackColor =11056034 - Name ="lblContactOrg" - Caption ="Contact org:" - FontName ="Arial" - End - End - End - Begin TextBox - TabStop = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =1860 - Top =1932 - Width =2700 - Height =252 - FontSize =9 - TabIndex =4 - Name ="tbxContactPhone" - StatusBarText ="Enter the contact phone number" - FontName ="Arial" - ControlTipText ="Enter the contact phone number" - - Begin - Begin Label - OverlapFlags =85 - Left =480 - Top =1932 - Width =1317 - Height =252 - FontSize =9 - FontWeight =700 - BackColor =11056034 - Name ="labContactPhone" - Caption ="Contact phone:" - FontName ="Arial" - End - End - End - Begin TextBox - TabStop = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =1860 - Top =2304 - Width =2700 - Height =252 - FontSize =9 - TabIndex =5 - Name ="tbxContactEmail" - StatusBarText ="Enter the contact organization for the application" - FontName ="Arial" - ControlTipText ="Enter the contact organization for the application" - - Begin - Begin Label - OverlapFlags =85 - Left =480 - Top =2304 - Width =1317 - Height =252 - FontSize =9 - FontWeight =700 - BackColor =11056034 - Name ="lblContactEmail" - Caption ="Contact email:" - FontName ="Arial" - End - End - End - Begin CommandButton - OverlapFlags =85 - Left =1980 - Top =120 - Width =1980 - Height =354 - FontSize =9 - FontWeight =700 - TabIndex =6 - Name ="cmdReleaseHistory" - Caption ="View release history" - OnClick ="[Event Procedure]" - FontName ="Arial" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin TextBox - Visible = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =120 - Top =2940 - Width =5280 - Height =720 - FontSize =9 - TabIndex =7 - Name ="tbxWeb_address" - StatusBarText ="Web address for application downloads" - FontName ="Arial" - - LayoutCachedLeft =120 - LayoutCachedTop =2940 - LayoutCachedWidth =5400 - LayoutCachedHeight =3660 - Begin - Begin Label - OverlapFlags =85 - Left =120 - Top =2640 - Width =4245 - Height =270 - FontSize =9 - Name ="lblWeb_address" - Caption ="Web address to which version updates are posted:" - FontName ="Arial" - LayoutCachedLeft =120 - LayoutCachedTop =2640 - LayoutCachedWidth =4365 - LayoutCachedHeight =2910 - End - End - End - End - End - End -End -CodeBehindForm -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = True -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Compare Database -Option Explicit - -' ================================= -' FORM NAME: frm_Set_Db_Info -' Description: Standard form for setting application version and contact information -' Data source: unbound -' Data access: edit only, no deletions -' Pages: none -' Functions: none -' References: fxnSwitchboardIsOpen -' Source/date: John R. Boetsch, September 2008 -' Adapted: Bonnie Campbell, May 2014 for NCPN WQ Utilities tool -' Revisions: JRB, 9/26/2008 - revised Form_Open to turn edits off except for AppMode='admin' -' JRB, 10/2/2008 - added web address and updated code for cmdReleaseHistory -' -------------------------------------------------------------------------------------- -' BLC, 6/3/2014 - Adapted for NCPN WQ Utilities tool -' BLC, 6/19/2014 - Replaced cAppMode with TempVars.Item("UserAccessLevel"), -' modified label & textbox control names to lblXX, cbxXX & tbxXX -' vs. labXX, cmbXX & txtXX -' ================================= - - -' --------------------------------- -' SUB: Form_Open -' Description: Opens sub form & sets controls based on UserAccessLevel -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John Boetsch - NCCN Landbirds db -' Adapted: Bonnie Campbell, May 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/19/2014 - Replaced cAppMode with TempVars.Item("UserAccessLevel"), -' modified label & textbox control names to lblXX, cbxXX & tbxXX -' vs. labXX, cmbXX & txtXX -' BLC, 8/25/2014 - adjusted source for form fields to fsub_DbAdmin vs frm_Switchboard -' --------------------------------- -Private Sub Form_Open(Cancel As Integer) - On Error GoTo Err_Handler - - ' Close if switchboard is not open - If SwitchboardIsOpen = False Then - MsgBox "The main database switchboard must be" & vbCrLf & _ - "open for this form to function properly.", , "Cannot open the form ..." - DoCmd.CancelEvent - Else - With Me - If TempVars.item("UserAccessLevel") = "admin" Then - .AllowEdits = True - .tbxWeb_address.Visible = True - Else - .AllowEdits = False - .tbxWeb_address.Visible = False - End If - - With Forms!frm_Switchboard!fsub_DbAdmin.Form - Me.tbxContactName = !tbxContact_Name - Me.tbxContactOrg = !tbxContact_Org - Me.tbxContactPhone = !tbxContact_Phone - Me.tbxContactEmail = !tbxContact_Email - Me.tbxWeb_address = !tbxWeb_address - End With - End With - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cbxVersion_GotFocus -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John Boetsch - NCCN Landbirds db -' Adapted: Bonnie Campbell, May 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/19/2014 - Replaced cAppMode with TempVars.Item("UserAccessLevel"), -' modified label & textbox control names to lblXX, cbxXX & tbxXX -' vs. labXX, cmbXX & txtXX -' --------------------------------- -Private Sub cbxVersion_GotFocus() - On Error GoTo Err_Handler - - Me.ActiveControl.Requery - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cbxVersion_NotInList -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John Boetsch - NCCN Landbirds db -' Adapted: Bonnie Campbell, May 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/19/2014 - XX -' --------------------------------- -Private Sub cbxVersion_NotInList(NewData As String, Response As Integer) - On Error GoTo Err_Handler - - Me.ActiveControl.Undo - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdReleaseHistory_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John Boetsch - NCCN Landbirds db -' Adapted: Bonnie Campbell, May 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/19/2014 - Replaced cAppMode with TempVars.Item("UserAccessLevel"), -' modified control names to lblXX, cbxXX & tbxXX vs. labXX, cmbXX & txtXX -' --------------------------------- -Private Sub cmdReleaseHistory_Click() - On Error GoTo Err_Handler - - ' View the release history form - If TempVars.item("UserAccessLevel") = "admin" Then - DoCmd.OpenForm "frm_App_Releases" - Else ' read-only for all but admin users - DoCmd.OpenForm "frm_App_Releases", , , , acFormReadOnly - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdOK_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John Boetsch - NCCN Landbirds db -' Adapted: Bonnie Campbell, May 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/19/2014 - Replaced cAppMode with TempVars.Item("UserAccessLevel"), -' modified label & textbox control names to lblXX, cbxXX & tbxXX -' vs. labXX, cmbXX & txtXX -' BLC, 8/25/2014 - Fixed frm to refer to fsub_DbAdmin vs frm_Switchboard -' --------------------------------- -Private Sub cmdOK_Click() - On Error GoTo Err_Handler - - Dim frm As Form - - ' Confirm that the critical data elements have been completed before saving - If IsNull(Me.cbxVersion) Then - MsgBox "Please indicate the version number", vbOKOnly, "Validation error" - Me.cbxVersion.SetFocus - GoTo Exit_Procedure - ElseIf IsNull(Me.tbxContactName) Then - MsgBox "Please enter the developer contact name", vbOKOnly, "Validation error" - Me.tbxContactName.SetFocus - GoTo Exit_Procedure - ElseIf IsNull(Me.tbxContactPhone) Then - MsgBox "Please enter a contact phone number", vbOKOnly, "Validation error" - Me.tbxContactPhone.SetFocus - GoTo Exit_Procedure - ElseIf IsNull(Me.tbxContactEmail) Then - MsgBox "Please enter a contact email", vbOKOnly, "Validation error" - Me.tbxContactEmail.SetFocus - GoTo Exit_Procedure - End If - - Set frm = [Forms]![frm_Switchboard]![fsub_DbAdmin].[Form] - - ' Save changes to the switchboard - If Me.cbxVersion <> frm.cbxVersion Then frm.cbxVersion = Me.cbxVersion - If Me.tbxContactName <> frm.tbxContact_Name Then frm.tbxContact_Name = Me.tbxContactName - If Me.tbxContactOrg <> frm.tbxContact_Org Then frm.tbxContact_Org = Me.tbxContactOrg - If Me.tbxContactPhone <> frm.tbxContact_Phone Then frm.tbxContact_Phone = Me.tbxContactPhone - If Me.tbxContactEmail <> frm.tbxContact_Email Then frm.tbxContact_Email = Me.tbxContactEmail - If Me.tbxContactEmail <> frm.tbxContact_Email Then _ - frm.tbxContact_Email.Hyperlink = "mailto:" & Me.tbxContactEmail = Me.tbxContactEmail - If Me.tbxWeb_address <> frm.tbxWeb_address Then frm.tbxWeb_address = Me.tbxWeb_address - - DoCmd.Close , , acSaveNo - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub diff --git a/source/forms/_frm_Task_List.bas b/source/forms/_frm_Task_List.bas deleted file mode 100644 index c07c5a1..0000000 --- a/source/forms/_frm_Task_List.bas +++ /dev/null @@ -1,1508 +0,0 @@ -Version =20 -VersionRequired =20 -Begin Form - AllowFilters = NotDefault - RecordSelectors = NotDefault - MaxButton = NotDefault - MinButton = NotDefault - ControlBox = NotDefault - AutoCenter = NotDefault - NavigationButtons = NotDefault - AllowDeletions = NotDefault - DividingLines = NotDefault - AllowAdditions = NotDefault - AllowUpdating =2 - ScrollBars =2 - ViewsAllowed =1 - TabularFamily =0 - BorderStyle =1 - PictureAlignment =2 - DatasheetGridlinesBehavior =3 - GridX =24 - GridY =24 - Width =12301 - DatasheetFontHeight =10 - ItemSuffix =29 - Right =7995 - Bottom =11385 - DatasheetGridlinesColor =12632256 - RecSrcDt = Begin - 0xa0a341e20e76e340 - End - RecordSource ="qfrm_Task_List" - Caption =" Task List Browser - Tasks associated with sample locations" - OnOpen ="[Event Procedure]" - DatasheetFontName ="Arial" - PrtMip = Begin - 0xa0050000a0050000a0050000a005000000000000201c0000e010000001000000 , - 0x010000006801000000000000a10700000100000001000000 - End - AllowDatasheetView =0 - AllowPivotTableView =0 - AllowPivotChartView =0 - AllowPivotChartView =0 - FilterOnLoad =0 - ShowPageMargins =0 - AllowLayoutView =0 - DatasheetGridlinesColor12 =12632256 - Begin - Begin Label - BackStyle =0 - BackColor =-2147483633 - ForeColor =-2147483630 - End - Begin Rectangle - SpecialEffect =3 - BackStyle =0 - BorderLineStyle =0 - End - Begin Line - BorderLineStyle =0 - End - Begin Image - BackStyle =0 - OldBorderStyle =0 - BorderLineStyle =0 - PictureAlignment =2 - End - Begin CommandButton - FontSize =8 - FontWeight =400 - FontName ="MS Sans Serif" - BorderLineStyle =0 - End - Begin OptionButton - SpecialEffect =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - End - Begin CheckBox - SpecialEffect =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - End - Begin OptionGroup - SpecialEffect =3 - BorderLineStyle =0 - End - Begin BoundObjectFrame - SpecialEffect =2 - OldBorderStyle =0 - BorderLineStyle =0 - BackStyle =0 - End - Begin TextBox - FELineBreak = NotDefault - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - AsianLineBreak =255 - End - Begin ListBox - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - End - Begin ComboBox - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - End - Begin Subform - SpecialEffect =2 - BorderLineStyle =0 - End - Begin UnboundObjectFrame - SpecialEffect =2 - OldBorderStyle =1 - End - Begin ToggleButton - FontSize =8 - FontWeight =400 - FontName ="MS Sans Serif" - BorderLineStyle =0 - End - Begin Tab - BackStyle =0 - BorderLineStyle =0 - End - Begin FormHeader - Height =1428 - BackColor =11651021 - Name ="FormHeader" - Begin - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =120 - Top =1200 - Width =672 - Height =228 - Name ="labPark_code" - Caption ="Park*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - Tag ="DetachedLabel" - End - Begin Label - FontItalic = NotDefault - OverlapFlags =93 - TextAlign =2 - Left =900 - Top =1200 - Width =1620 - Height =228 - FontWeight =700 - Name ="labLoc_code" - Caption ="Sample location*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =93 - TextAlign =2 - Left =9660 - Top =1200 - Width =1200 - Height =227 - Name ="labRequest_date" - Caption ="Request date*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =4800 - Top =1200 - Width =1140 - Height =228 - Name ="labTask_desc" - Caption ="Description*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =87 - TextAlign =2 - Left =10864 - Top =1200 - Width =1437 - Height =228 - Name ="labDate_completed" - Caption ="Date completed*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =87 - TextAlign =2 - Left =2520 - Top =1200 - Width =1332 - Height =228 - Name ="labTask_status" - Caption ="Task status*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - End - Begin CommandButton - OverlapFlags =85 - Left =11340 - Top =120 - Width =720 - Height =294 - FontWeight =700 - Name ="cmdClose" - Caption ="Close" - OnClick ="[Event Procedure]" - FontName ="Arial" - ControlTipText ="Close the form" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin ComboBox - LimitToList = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =780 - Top =637 - Width =1020 - Height =270 - TabIndex =1 - ColumnInfo ="\"\";\"\";\"10\";\"8\"" - Name ="cmbParkFilter" - RowSourceType ="Table/Query" - RowSource ="tlu_Parks" - StatusBarText ="Filter by park code" - AfterUpdate ="[Event Procedure]" - FontName ="Arial" - ControlTipText ="Filter by park code" - - Begin - Begin Label - OverlapFlags =85 - TextAlign =3 - Left =120 - Top =637 - Width =540 - Height =228 - FontWeight =700 - Name ="labParkFilter" - Caption ="Park:" - FontName ="Arial" - End - End - End - Begin ToggleButton - OverlapFlags =85 - Left =1920 - Top =600 - Width =480 - Height =300 - TabIndex =2 - Name ="togFilterByPark" - AfterUpdate ="[Event Procedure]" - DefaultValue ="0" - Caption ="Filter on" - PictureData = Begin - 0x2800000010000000100000000100040000000000800000000000000000000000 , - 0x0000000000000000000000000000800000800000008080008000000080008000 , - 0x8080000080808000c0c0c0000000ff00c0c0c00000ffff00ff000000c0c0c000 , - 0xffff0000ffffff00dadadadadadadadaadadadadadadadaddadadadadadadada , - 0xadadad0000adadaddadada0660dadadaadadad0660adadaddadada0f80dadada , - 0xadadad0f80adadaddadad088860adadaadad06888660adaddad068f888660ada , - 0xad068f88888660add068fff88886660aa00000000000000ddadadadadadadada , - 0xadadadadadadadad000000000000000000000000000000000000000000000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000 - End - FontName ="Arial" - ObjectPalette = Begin - 0x000301000000000000000000 - End - ControlTipText ="Turn the park filter on or off" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin ComboBox - LimitToList = NotDefault - AllowAutoCorrect = NotDefault - RowSourceTypeInt =1 - OverlapFlags =85 - IMESentenceMode =3 - ListWidth =1440 - Left =6540 - Top =637 - Width =1380 - Height =270 - TabIndex =5 - Name ="cmbStatusFilter" - RowSourceType ="Value List" - RowSource ="Active;Complete;Inactive" - StatusBarText ="Filter by task status" - AfterUpdate ="[Event Procedure]" - FontName ="Arial" - ControlTipText ="Filter by task status" - - Begin - Begin Label - OverlapFlags =85 - TextAlign =3 - Left =5280 - Top =637 - Width =1140 - Height =228 - FontWeight =700 - Name ="labStatusFilter" - Caption ="Task status:" - FontName ="Arial" - End - End - End - Begin ToggleButton - OverlapFlags =85 - Left =8040 - Top =600 - Width =480 - Height =300 - TabIndex =6 - Name ="togFilterByStatus" - AfterUpdate ="[Event Procedure]" - DefaultValue ="0" - Caption ="Filter on" - PictureData = Begin - 0x2800000010000000100000000100040000000000800000000000000000000000 , - 0x0000000000000000000000000000800000800000008080008000000080008000 , - 0x8080000080808000c0c0c0000000ff00c0c0c00000ffff00ff000000c0c0c000 , - 0xffff0000ffffff00dadadadadadadadaadadadadadadadaddadadadadadadada , - 0xadadad0000adadaddadada0660dadadaadadad0660adadaddadada0f80dadada , - 0xadadad0f80adadaddadad088860adadaadad06888660adaddad068f888660ada , - 0xad068f88888660add068fff88886660aa00000000000000ddadadadadadadada , - 0xadadadadadadadad - End - FontName ="Arial" - ObjectPalette = Begin - 0x000301000000000000000000 - End - ControlTipText ="Turn the task status filter on or off" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin CommandButton - OverlapFlags =85 - Left =9000 - Top =120 - Width =1980 - Height =300 - FontWeight =700 - TabIndex =9 - Name ="cmdNewTask" - Caption ="New task item" - OnClick ="[Event Procedure]" - FontName ="Arial" - ControlTipText ="Add a new task item" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin Line - OverlapFlags =85 - Top =1080 - Width =12300 - Name ="Line26" - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =8940 - Top =1200 - Width =660 - Height =227 - Name ="labRequest_year" - Caption ="Year*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - Tag ="DetachedLabel" - End - Begin ComboBox - AllowAutoCorrect = NotDefault - OverlapFlags =85 - TextAlign =1 - IMESentenceMode =3 - ListRows =20 - Left =10200 - Top =637 - Width =900 - Height =270 - TabIndex =7 - Name ="cmbYearFilter" - RowSourceType ="Table/Query" - RowSource ="SELECT qfrm_Task_List.Request_year FROM qfrm_Task_List WHERE (((qfrm_Task_List.R" - "equest_year) Is Not Null)) GROUP BY qfrm_Task_List.Request_year ORDER BY qfrm_Ta" - "sk_List.Request_year DESC; " - StatusBarText ="Filter by request year" - AfterUpdate ="[Event Procedure]" - FontName ="Arial" - ControlTipText ="Filter by request year" - - Begin - Begin Label - OverlapFlags =85 - TextAlign =3 - Left =8640 - Top =630 - Width =1440 - Height =240 - Name ="labYearFilter" - Caption ="Year requested:" - FontName ="Arial" - End - End - End - Begin ToggleButton - OverlapFlags =85 - Left =11220 - Top =600 - Width =480 - Height =300 - TabIndex =8 - Name ="togFilterByYear" - AfterUpdate ="[Event Procedure]" - DefaultValue ="0" - Caption ="Filter on" - PictureData = Begin - 0x2800000010000000100000000100040000000000800000000000000000000000 , - 0x0000000000000000000000000000800000800000008080008000000080008000 , - 0x8080000080808000c0c0c0000000ff00c0c0c00000ffff00ff000000c0c0c000 , - 0xffff0000ffffff00dadadadadadadadaadadadadadadadaddadadadadadadada , - 0xadadad0000adadaddadada0660dadadaadadad0660adadaddadada0f80dadada , - 0xadadad0f80adadaddadad088860adadaadad06888660adaddad068f888660ada , - 0xad068f88888660add068fff88886660aa00000000000000ddadadadadadadada , - 0xadadadadadadadad - End - FontName ="Arial" - ObjectPalette = Begin - 0x000301000000000000000000 - End - ControlTipText ="Turn the year filter on or off" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin ComboBox - LimitToList = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - ColumnCount =3 - ListRows =20 - ListWidth =2880 - Left =3540 - Top =637 - Width =1020 - Height =270 - TabIndex =3 - Name ="cmbSiteFilter" - RowSourceType ="Table/Query" - RowSource ="SELECT tbl_Sites.Site_ID, tbl_Sites.Site_code, tbl_Sites.Site_status FROM tbl_Si" - "tes WHERE (((tbl_Sites.Park_code)=[Forms]![frm_Task_List]![cmbParkFilter])) ORDE" - "R BY tbl_Sites.Site_status, tbl_Sites.Site_code; " - ColumnWidths ="0;1440;1440" - StatusBarText ="Filter by site" - AfterUpdate ="[Event Procedure]" - FontName ="Arial" - ControlTipText ="Filter by site" - - Begin - Begin Label - OverlapFlags =85 - TextAlign =3 - Left =2580 - Top =637 - Width =840 - Height =228 - Name ="labSiteFilter" - Caption ="Site:" - FontName ="Arial" - End - End - End - Begin ToggleButton - OverlapFlags =85 - Left =4680 - Top =600 - Width =480 - Height =330 - TabIndex =4 - Name ="togFilterBySite" - AfterUpdate ="[Event Procedure]" - DefaultValue ="0" - Caption ="Filter on" - PictureData = Begin - 0x2800000010000000100000000100040000000000800000000000000000000000 , - 0x0000000000000000000000000000800000800000008080008000000080008000 , - 0x8080000080808000c0c0c0000000ff00c0c0c00000ffff00ff000000c0c0c000 , - 0xffff0000ffffff00dadadadadadadadaadadadadadadadaddadadadadadadada , - 0xadadad0000adadaddadada0660dadadaadadad0660adadaddadada0f80dadada , - 0xadadad0f80adadaddadad088860adadaadad06888660adaddad068f888660ada , - 0xad068f88888660add068fff88886660aa00000000000000ddadadadadadadada , - 0xadadadadadadadad - End - FontName ="Arial" - ObjectPalette = Begin - 0x000301000000000000000000 - End - ControlTipText ="Turn the site filter on or off" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin CommandButton - OverlapFlags =85 - Left =6360 - Top =120 - Width =2100 - Height =300 - FontWeight =700 - TabIndex =10 - ForeColor =-2147483630 - Name ="cmdTaskListRpt" - Caption ="View report" - OnClick ="[Event Procedure]" - FontName ="Arial" - ControlTipText ="Generate the task list report" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - End - End - Begin Section - Height =360 - BackColor =11651021 - Name ="Detail" - Begin - Begin TextBox - Locked = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =9664 - Top =60 - Width =1200 - ColumnWidth =1710 - TabIndex =5 - ForeColor =0 - Name ="txtRequest_date" - ControlSource ="Request_date" - Format ="yyyy mmm dd" - OnDblClick ="[Event Procedure]" - FontName ="Arial" - - End - Begin TextBox - Locked = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =10924 - Top =60 - Width =1320 - ColumnWidth =1710 - TabIndex =6 - Name ="txtDate_completed" - ControlSource ="Date_completed" - Format ="yyyy mmm dd" - FontName ="Arial" - - End - Begin TextBox - Locked = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =4800 - Top =60 - Width =4080 - ColumnWidth =2310 - TabIndex =3 - Name ="txtTask_desc" - ControlSource ="Task_desc" - FontName ="Arial" - - End - Begin TextBox - Locked = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =120 - Top =60 - Width =720 - ColumnWidth =2310 - Name ="txtPark_code" - ControlSource ="Park_code" - StatusBarText ="Park code" - FontName ="Arial" - - End - Begin TextBox - Locked = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =960 - Top =60 - ColumnWidth =2310 - TabIndex =1 - ForeColor =0 - Name ="txtLoc_code" - ControlSource ="Loc_code" - StatusBarText ="Sample location" - FontName ="Arial" - - End - Begin CommandButton - OverlapFlags =85 - Left =3960 - Top =36 - Width =780 - Height =300 - TabIndex =7 - Name ="cmdCloseup" - Caption ="Closeup" - OnClick ="[Event Procedure]" - FontName ="Arial" - ControlTipText ="Open this task record" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - Begin TextBox - Locked = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =2520 - Top =60 - Width =1320 - TabIndex =2 - Name ="txtTask_status" - ControlSource ="Task_status" - StatusBarText ="Task status" - FontName ="Arial" - - End - Begin TextBox - Locked = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =8940 - Top =60 - Width =660 - TabIndex =4 - Name ="txtRequest_year" - ControlSource ="Request_year" - StatusBarText ="Year the task request was made" - FontName ="Arial" - ControlTipText ="Year the task request was made" - - End - End - End - Begin FormFooter - Height =0 - BackColor =-2147483633 - Name ="FormFooter" - End - End -End -CodeBehindForm -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = True -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Compare Database -Option Explicit - -' ================================= -' FORM NAME: frm_Task_List -' Description: Standard form for viewing tasks associated with sample locations -' Data source: qfrm_Task_List -' Data access: view only -' Pages: none -' Functions: fxnSortRecords, fxnFilterRecords -' References: fxnSaveFile -' Source/date: John R. Boetsch, July 26, 2006 -' Revisions: JRB, 5/21/2007 - Updated to replace cmbType with cmbStatusFilter, and -' togFilterByType with togFilterByStatus -' JRB, 5/21/2008 - updated description and title bar -' JRB, 6/5/2008 - updated header field and filters for parallel code with -' Data Gateway -' JRB, 9/26/2008 - updated Form_Open to include read only mode -' JRB, 2/12/2008 - renamed cmbSiteFilter to cmbLocFilter, and togFilterBySite to -' togFilterByLoc to be consistent with data browser code; updated Form_Open -' to permit filtering on open; updated fxnFilterRecords -' JRB, 6/9/2009 - added cmdTaskListRpt -' JRB, 12/17/2009 - updated form to capitalize data elements -' ================================= - -Dim strSortField As String ' Keeps track of current sort settings -Dim strSortOrder As String -Dim strSortFieldLabel As String - -' --------------------------------- -' SUB: Form_Open -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - updated to use TempVars.Item("UserAccessLevel") vs. cAppMode -' TempVars.Item("Park") vs. cPark -' --------------------------------- -Private Sub Form_Open(Cancel As Integer) - On Error GoTo Err_Handler - - Dim varReturn As Variant - - ' Close the form if the switchboard is not open - If SwitchboardIsOpen = False Then - MsgBox "The main database switchboard must be" & vbCrLf & _ - "open for this form to function properly.", , "Cannot open the form ..." - DoCmd.CancelEvent - GoTo Exit_Procedure - End If - - ' On opening the form, set the initial sort order - strSortFieldLabel = "labLoc_code" - varReturn = fxnSortRecords("Loc_code", "Request_date") - - If Me.FilterOn Then - ' If the form is filtered, set the filter according to the filtered record -'FIX -' Me.cmbParkFilter = Me.Park_code - Me.togFilterByPark = True -' Me.cmbSiteFilter = Me.Site_ID - Me.togFilterBySite = True - fxnFilterRecords (True) - Else - ' Set the default form filter - Me.cmbParkFilter = TempVars.item("Park") - Me.togFilterByPark = True - Me.cmbStatusFilter = "Active" - Me.togFilterByStatus = True - fxnFilterRecords - End If - - ' Disable new task button for read only application mode - If TempVars.item("UserAccessLevel") = "read only" Then _ - Me.cmdNewTask.Enabled = False Else Me.cmdNewTask.Enabled = True - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmbParkFilter_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub cmbParkFilter_AfterUpdate() - On Error GoTo Err_Handler - - Me.togFilterByPark = Not IsNull(Me.cmbParkFilter) - Me.cmbSiteFilter = Null - Me.togFilterBySite = False - fxnFilterRecords - Me.cmbSiteFilter.Requery - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: togFilterByPark_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub togFilterByPark_AfterUpdate() - On Error GoTo Err_Handler - - If IsNull(Me.cmbParkFilter) = False Then fxnFilterRecords _ - Else Me.togFilterByPark = False - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmbSiteFilter_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub cmbSiteFilter_AfterUpdate() - On Error GoTo Err_Handler - - Me.togFilterBySite = Not IsNull(Me.cmbSiteFilter) - fxnFilterRecords - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: togFilterBySite_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub togFilterBySite_AfterUpdate() - On Error GoTo Err_Handler - - If IsNull(Me.cmbSiteFilter) = False Then fxnFilterRecords _ - Else Me.togFilterBySite = False - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmbStatusFilter_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub cmbStatusFilter_AfterUpdate() - On Error GoTo Err_Handler - - Me.togFilterByStatus = Not IsNull(Me.cmbStatusFilter) - fxnFilterRecords - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: togFilterByStatus_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub togFilterByStatus_AfterUpdate() - On Error GoTo Err_Handler - - If IsNull(Me.cmbStatusFilter) = False Then fxnFilterRecords _ - Else Me.togFilterByStatus = False - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmbYearFilter_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub cmbYearFilter_AfterUpdate() - On Error GoTo Err_Handler - - Me.togFilterByYear = Not IsNull(Me.cmbYearFilter) - fxnFilterRecords - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: togFilterByYear_AfterUpdate -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub togFilterByYear_AfterUpdate() - On Error GoTo Err_Handler - - If IsNull(Me.cmbYearFilter) = False Then fxnFilterRecords _ - Else Me.togFilterByYear = False - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdTaskListRpt_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - updated to use TempVars.Item("Timeframe") vs. cTimeframe -' --------------------------------- -Private Sub cmdTaskListRpt_Click() - On Error GoTo Err_Handler - - ' Generate the task list report - Dim strRptName As String - Dim strMsg As String - Dim strFilter As String - Dim strTimeframe As String - Dim bFilterOn As Boolean - Dim strCaption As String - Dim strPark As String - Dim strSite As String - Dim strInitFile As String - Dim strSaveFile As String - Dim varResponse As VbMsgBoxResult - - strRptName = "rpt_Task_List" - - strFilter = "" - bFilterOn = False - strTimeframe = TempVars.item("Timeframe") - - strMsg = "This will generate the task list report ..." & vbCrLf & vbCrLf & _ - "Would you like to limit task list output to " & vbCrLf & _ - "scheduled sampling locations for " & strTimeframe & "?" & vbCrLf & vbCrLf & _ - "Select NO to output all active task items ..." - varResponse = MsgBox(strMsg, vbYesNoCancel, "Task list report") - - Select Case varResponse - Case vbCancel - GoTo Exit_Procedure - Case vbYes - bFilterOn = True - strFilter = "[Calendar_year]=""" & strTimeframe & """" - strCaption = strTimeframe - Case Else - ' Do not filter by calendar year - strCaption = "" - End Select - - ' Get user input for the park and/or location to filter on - strPark = Trim(InputBox("Enter the park code to filter by" & vbCrLf & _ - "(or leave blank to show all):", "Filter by park", Me.cmbParkFilter)) - strSite = Trim(InputBox("Enter the site code" & vbCrLf & _ - "(or leave blank to show all):", "Filter by site code")) - ' Create the filter string - If strPark <> "" Then - If bFilterOn Then strFilter = strFilter & " AND " - bFilterOn = True - strFilter = strFilter & "[Park_code]=""" & strPark & """" - End If - If strSite <> "" Then - If bFilterOn Then strFilter = strFilter & " AND " - bFilterOn = True - strFilter = strFilter & "[Site_code]=""" & strSite & """" - End If - - DoCmd.OpenReport strRptName, acViewPreview, , strFilter, , strCaption - If MsgBox("Would you like to save this report?", vbYesNo + vbDefaultButton2, _ - "Save report to a file?") = vbYes Then - If varResponse = vbYes And strTimeframe <> "" Then - ' Add timeframe to file name - strInitFile = Application.CurrentProject.Path & "\" & strRptName & "_" & _ - strTimeframe & "_" & CStr(Format(Now(), "yyyymmdd")) & ".snp" - Else - strInitFile = Application.CurrentProject.Path & "\" & strRptName & "_" & _ - CStr(Format(Now(), "yyyymmdd")) & ".snp" - End If - ' Open the save file dialog and update to the actual name given by the user - strSaveFile = SaveFile(strInitFile, "Snapshot Viewer (*.snp)", "*.snp") - ' Close the report because opening the new file in its own application - DoCmd.Close acReport, strRptName, acSaveNo - DoCmd.OutputTo acOutputReport, strRptName, acFormatSNP, strSaveFile, True - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case 94, 2001 - ' User canceled dialog box - do nothing - Case 2501 - ' Canceled open report action - do nothing - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - End Select - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdNewTask_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub cmdNewTask_Click() - On Error GoTo Err_Handler - - Set gvarRefForm = Me.Form - DoCmd.OpenForm "frm_Task_List_Popup", , , , acFormAdd, , Me.cmbParkFilter - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdCloseup_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub cmdCloseup_Click() - On Error GoTo Err_Handler - -' If IsNull(Me.Location_ID) = False Then - ' If there is a location ID in the record ... - - ' Set the global reference variables - Set gvarRefForm = Me.Form -' DoCmd.OpenForm "frm_Task_List_Popup", , , "[Location_ID]=""" & Me.Location_ID & _ -' """ AND [Request_date] = #" & Me.Request_date & "# AND [Task_desc] = """ & _ -' Me.Task_desc & """", acFormEdit, , Me.Park_code -' -' End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdClose_Click -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub cmdClose_Click() - On Error GoTo Err_Handler - - DoCmd.Close , , acSaveNo - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' ================================= -' The next several procedures re-sort the records if the user -' double-clicks on a field label -' --------------------------------- -' SUB: labPark_code_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub labPark_code_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("Park_code") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: labLoc_code_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub labLoc_code_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("Loc_code") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: labTask_status_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub labTask_status_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("Task_status") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: labTask_desc_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub labTask_desc_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("Task_desc") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: labRequest_year_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub labRequest_year_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("Request_year") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: labRequest_date_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub labRequest_date_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("Request_date") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: labDate_completed_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Sub labDate_completed_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("Date_completed") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' FUNCTION: fxnSortRecords -' Description: Sorts the records by the indicated field -' Parameters: strFieldName -' Returns: none -' Throws: none -' References: strFieldName, strSortOrder, strSortFieldLabel -' (form-level variables) -' Source/date: John R. Boetsch, May 5, 2006 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Function fxnSortRecords(ByVal strFieldName As String, _ - Optional ByVal strField2Name As String) - On Error GoTo Err_Handler - - Dim strOrderBy As String - - ' If already sorting in ascending order by this field, sort descending - If strFieldName = strSortField And strSortOrder = "" Then - strSortOrder = " DESC" - Else: strSortOrder = "" - End If - ' Create the order by string and activate the filter - strOrderBy = strFieldName & strSortOrder - If strField2Name <> "" Then - strOrderBy = strField2Name & " DESC, " & strOrderBy - End If - strSortField = strFieldName - Me.Form.OrderBy = strOrderBy - Me.Form.OrderByOn = True - - ' Change the label format to indicate the sorted field - Me.Controls.item(strSortFieldLabel).FontItalic = False - Me.Controls.item(strSortFieldLabel).fontBold = False - strSortFieldLabel = "lab" & strFieldName - Me.Controls.item(strSortFieldLabel).FontItalic = True - Me.Controls.item(strSortFieldLabel).fontBold = True - -Exit_Procedure: - Exit Function - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - fxnSortRecords)" - Resume Exit_Procedure - -End Function - -' --------------------------------- -' FUNCTION: fxnFilterRecords -' Description: Filter the records by the indicated field -' Parameters: none -' Returns: none -' Throws: none -' References: none -' Source/date: John R. Boetsch, May 5, 2006 -' Revisions: JRB, 5/21/2007 - Updated to replace cmbType with cmbStatusFilter, and -' togFilterByType with togFilterByStatus -' JRB, 6/5/2008 - made code more robust and error-proof -' JRB, 2/12/2009 - updated to add bOpenFilterOn and code for appending 'AND' -' statements -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 7/29/2014 - XX -' --------------------------------- -Private Function fxnFilterRecords(Optional ByVal bOpenFilterOn As Boolean) - On Error GoTo Err_Handler - - Dim strFilter As String - Dim bFilterOn As Boolean - - bFilterOn = bOpenFilterOn ' default is false - If bOpenFilterOn Then GoTo Reformat_controls - - strFilter = "" - - ' Build the filter string depending on which fields are being filtered on - If Me.togFilterByPark Then - bFilterOn = True - strFilter = "[Park_code] = """ & Me.cmbParkFilter & """" - End If - If Me.togFilterBySite Then - If bFilterOn Then strFilter = strFilter & " AND " - bFilterOn = True - strFilter = strFilter & "[Site_ID] = """ & Me.cmbSiteFilter & """" - End If - If Me.togFilterByStatus Then - If bFilterOn Then strFilter = strFilter & " AND " - bFilterOn = True - strFilter = strFilter & "[Task_status] = """ & Me.cmbStatusFilter & """" - End If - If Me.togFilterByYear Then - If bFilterOn Then strFilter = strFilter & " AND " - bFilterOn = True - strFilter = strFilter & "[Request_year] = """ & Me.cmbYearFilter & """" - End If - - Me.Filter = strFilter - Me.FilterOn = bFilterOn - -Reformat_controls: - ' Make the labels bold or not depending on filter settings - Me.labParkFilter.fontBold = Me.togFilterByPark - Me.labSiteFilter.fontBold = Me.togFilterBySite - Me.labStatusFilter.fontBold = Me.togFilterByStatus - Me.labYearFilter.fontBold = Me.togFilterByYear - -Exit_Procedure: - Exit Function - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - fxnFilterRecords)" - Resume Exit_Procedure - -End Function diff --git a/source/forms/_frm_Task_List_Popup.bas b/source/forms/_frm_Task_List_Popup.bas deleted file mode 100644 index ec87880..0000000 --- a/source/forms/_frm_Task_List_Popup.bas +++ /dev/null @@ -1,664 +0,0 @@ -Version =20 -VersionRequired =20 -Begin Form - AllowFilters = NotDefault - PopUp = NotDefault - Modal = NotDefault - RecordSelectors = NotDefault - MaxButton = NotDefault - MinButton = NotDefault - AutoCenter = NotDefault - AllowDeletions = NotDefault - DividingLines = NotDefault - DefaultView =0 - ScrollBars =0 - ViewsAllowed =1 - TabularFamily =0 - BorderStyle =1 - PictureAlignment =2 - DatasheetGridlinesBehavior =3 - Cycle =1 - GridX =24 - GridY =24 - Width =8580 - DatasheetFontHeight =9 - ItemSuffix =20 - Left =4605 - Top =2730 - Right =12600 - Bottom =14115 - DatasheetGridlinesColor =12632256 - RecSrcDt = Begin - 0xae250b0a8d01e340 - End - RecordSource ="tbl_Task_List" - Caption =" Sample Location Task Item" - BeforeUpdate ="[Event Procedure]" - OnOpen ="[Event Procedure]" - OnClose ="[Event Procedure]" - DatasheetFontName ="Arial" - PrtMip = Begin - 0xa0050000a0050000a0050000a005000000000000201c0000e010000001000000 , - 0x010000006801000000000000a10700000100000001000000 - End - AllowDatasheetView =0 - AllowPivotTableView =0 - AllowPivotChartView =0 - AllowPivotChartView =0 - FilterOnLoad =0 - ShowPageMargins =0 - AllowLayoutView =0 - DatasheetGridlinesColor12 =12632256 - Begin - Begin Label - BackStyle =0 - BackColor =-2147483633 - ForeColor =-2147483630 - End - Begin Rectangle - SpecialEffect =3 - BackStyle =0 - BorderLineStyle =0 - End - Begin Image - BackStyle =0 - OldBorderStyle =0 - BorderLineStyle =0 - PictureAlignment =2 - End - Begin CommandButton - FontSize =8 - FontWeight =400 - FontName ="MS Sans Serif" - BorderLineStyle =0 - End - Begin OptionButton - SpecialEffect =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - End - Begin CheckBox - SpecialEffect =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - End - Begin OptionGroup - SpecialEffect =3 - BorderLineStyle =0 - End - Begin BoundObjectFrame - SpecialEffect =2 - OldBorderStyle =0 - BorderLineStyle =0 - BackStyle =0 - End - Begin TextBox - FELineBreak = NotDefault - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - AsianLineBreak =255 - End - Begin ListBox - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - End - Begin ComboBox - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - End - Begin Subform - SpecialEffect =2 - BorderLineStyle =0 - End - Begin UnboundObjectFrame - SpecialEffect =2 - OldBorderStyle =1 - End - Begin ToggleButton - FontSize =8 - FontWeight =400 - FontName ="MS Sans Serif" - BorderLineStyle =0 - End - Begin Tab - BackStyle =0 - BorderLineStyle =0 - End - Begin Section - Height =8520 - BackColor =11050649 - Name ="Detail" - Begin - Begin ComboBox - LimitToList = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - ColumnCount =4 - ListRows =20 - ListWidth =4320 - Left =1200 - Top =420 - Width =1980 - Height =252 - ColumnWidth =2568 - FontSize =9 - TabIndex =1 - Name ="cmbLocation_ID" - ControlSource ="Location_ID" - RowSourceType ="Table/Query" - RowSource ="SELECT tbl_Locations.Location_ID, IIf(IsNull([Site_code]),[tbl_Locations].[Park_" - "code],[Site_code]) & '.' & [Location_code] AS Loc_code, IIf([Location_type]='Ori" - "gin','Transect origin',IIf([Location_type]='New' Or [Location_type]='Survey' Or " - "[Location_type]='Additional','Sample point',[Location_type])) AS Loc_type, tbl_L" - "ocations.Location_status FROM tbl_Sites RIGHT JOIN tbl_Locations ON tbl_Sites.Si" - "te_ID = tbl_Locations.Site_ID WHERE (((tbl_Locations.Park_code)=[Forms]![frm_Tas" - "k_List_Popup]![cmbPark])) ORDER BY IIf(IsNull([Site_code]),[tbl_Locations].[Park" - "_code],[Site_code]) & '.' & [Location_code], tbl_Locations.Location_status; " - ColumnWidths ="0;1440;1440;1152" - StatusBarText ="Sampling location" - BeforeUpdate ="[Event Procedure]" - FontName ="Arial" - OnGotFocus ="[Event Procedure]" - OnNotInList ="[Event Procedure]" - Begin - Begin Label - OverlapFlags =85 - Left =1200 - Top =120 - Width =1680 - Height =255 - FontSize =9 - FontWeight =700 - Name ="labLocation_ID" - Caption ="Sample location" - FontName ="Arial" - End - End - End - Begin TextBox - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =3300 - Top =420 - Width =2340 - Height =252 - ColumnWidth =1140 - FontSize =9 - TabIndex =2 - Name ="txtRequest_date" - ControlSource ="Request_date" - StatusBarText ="Date of the task request" - DefaultValue ="=Date()" - FontName ="Arial" - - Begin - Begin Label - OverlapFlags =85 - Left =3300 - Top =120 - Width =1380 - Height =252 - FontSize =9 - FontWeight =700 - Name ="labRequest_date" - Caption ="Request date" - FontName ="Arial" - End - End - End - Begin TextBox - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =120 - Top =1068 - Width =6780 - Height =252 - ColumnWidth =6312 - FontSize =9 - TabIndex =4 - Name ="txtTask_desc" - ControlSource ="Task_desc" - StatusBarText ="Brief description of the task" - FontName ="Arial" - - Begin - Begin Label - OverlapFlags =85 - Left =120 - Top =780 - Width =1800 - Height =252 - FontSize =9 - FontWeight =700 - Name ="labTask_desc" - Caption ="Brief description" - FontName ="Arial" - End - End - End - Begin TextBox - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =120 - Top =4920 - Height =252 - ColumnWidth =1140 - FontSize =9 - TabIndex =7 - Name ="txtDate_completed" - ControlSource ="Date_completed" - StatusBarText ="Date the task was completed" - FontName ="Arial" - - Begin - Begin Label - OverlapFlags =85 - Left =120 - Top =4620 - Width =1440 - Height =255 - FontSize =9 - Name ="labDate_completed" - Caption ="Date completed" - FontName ="Arial" - End - End - End - Begin TextBox - OverlapFlags =85 - IMESentenceMode =3 - Left =120 - Top =1728 - Width =8340 - Height =2772 - FontSize =9 - TabIndex =6 - Name ="txtTask_notes" - ControlSource ="Task_notes" - StatusBarText ="Notes about the task" - FontName ="Arial" - - Begin - Begin Label - OverlapFlags =85 - Left =120 - Top =1440 - Width =1380 - Height =252 - FontSize =9 - Name ="labTask_notes" - Caption ="Task notes" - FontName ="Arial" - End - End - End - Begin ComboBox - LimitToList = NotDefault - TabStop = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =120 - Top =420 - Width =960 - Height =264 - FontSize =9 - ColumnInfo ="\"\";\"\";\"10\";\"8\"" - Name ="cmbPark" - RowSourceType ="Table/Query" - RowSource ="SELECT tlu_Parks.Park_code FROM tlu_Parks ORDER BY tlu_Parks.Park_code; " - StatusBarText ="Park code" - FontName ="Arial" - - Begin - Begin Label - OverlapFlags =85 - Left =120 - Top =120 - Width =600 - Height =252 - FontSize =9 - FontWeight =700 - Name ="labPark_code" - Caption ="Park" - FontName ="Arial" - End - End - End - Begin ComboBox - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - ColumnCount =2 - ListRows =20 - ListWidth =3600 - Left =5760 - Top =420 - Width =2640 - Height =264 - FontSize =9 - TabIndex =3 - Name ="cmbRequested_by" - ControlSource ="Requested_by" - RowSourceType ="Table/Query" - RowSource ="SELECT tlu_Project_Crew.Contact_ID, IIf([Contact_is_active],'Active','') AS Is_a" - "ctive FROM tlu_Project_Crew ORDER BY IIf([Contact_is_active],'Active','') DESC ," - " tlu_Project_Crew.Contact_ID; " - ColumnWidths ="2592;1008" - StatusBarText ="Name of the person making the initial request" - FontName ="Arial" - - Begin - Begin Label - OverlapFlags =85 - Left =5760 - Top =120 - Width =1440 - Height =255 - FontSize =9 - Name ="labRequested_by" - Caption ="Requested by" - FontName ="Arial" - End - End - End - Begin ComboBox - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - ColumnCount =2 - ListRows =20 - ListWidth =3600 - Left =1680 - Top =4920 - Width =2640 - Height =264 - FontSize =9 - TabIndex =8 - Name ="cmbFollowup_by" - ControlSource ="Followup_by" - RowSourceType ="Table/Query" - RowSource ="SELECT tlu_Project_Crew.Contact_ID, IIf([Contact_is_active],'Active','') AS Is_a" - "ctive FROM tlu_Project_Crew ORDER BY IIf([Contact_is_active],'Active','') DESC ," - " tlu_Project_Crew.Contact_ID; " - ColumnWidths ="2592;1008" - StatusBarText ="Name of the person following up on or completing the task" - FontName ="Arial" - - Begin - Begin Label - OverlapFlags =85 - Left =1680 - Top =4620 - Width =1320 - Height =252 - FontSize =9 - Name ="labFollowup_by" - Caption ="Follow-up by" - FontName ="Arial" - End - End - End - Begin TextBox - OverlapFlags =85 - IMESentenceMode =3 - Left =120 - Top =5628 - Width =8340 - Height =2772 - FontSize =9 - TabIndex =9 - Name ="txtFollowup_notes" - ControlSource ="Followup_notes" - StatusBarText ="Comments regarding what was done to follow-up on or complete this task" - FontName ="Arial" - - Begin - Begin Label - OverlapFlags =85 - Left =120 - Top =5340 - Width =1500 - Height =255 - FontSize =9 - Name ="labFollowup_notes" - Caption ="Follow-up notes" - FontName ="Arial" - End - End - End - Begin ComboBox - AllowAutoCorrect = NotDefault - RowSourceTypeInt =1 - OverlapFlags =85 - IMESentenceMode =3 - Left =7020 - Top =1080 - FontSize =9 - TabIndex =5 - Name ="cmbTask_status" - ControlSource ="Task_status" - RowSourceType ="Value List" - RowSource ="Active;Complete;Inactive" - StatusBarText ="Status of the task" - DefaultValue ="\"Active\"" - FontName ="Arial" - - Begin - Begin Label - OverlapFlags =85 - Left =7020 - Top =780 - Width =1140 - Height =252 - FontSize =9 - FontWeight =700 - Name ="labTask_status" - Caption ="Task status" - FontName ="Arial" - End - End - End - End - End - End -End -CodeBehindForm -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = True -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Compare Database -Option Explicit - -' ================================= -' FORM NAME: frm_Task_List_Popup -' Description: Standard form for viewing and editing tasks associated with sample locations -' Data source: tbl_Task_List -' Data access: edit, add, no delete -' Pages: none -' Functions: none -' References: fxnSwitchboardIsOpen -' Source/date: John R. Boetsch, July 2006 -' Revisions: JRB, 5/21/2007 - changed txtTask_status to cmbTask_status; locked cmbPark -' on existing records -' JRB, 1/22/2008 - added validation code, revised layout -' JRB, 5/20/2008 - updated description -' JRB, 10/14/2008 - updated Form_Open to include read only mode; updated -' gvarRefForm/Ctl error code in Form_Close -' -------------------------------------------------------------------------------------- -' BLC, 6/3/2014 - Adapted for NCPN WQ Utilities tool -' BLC, 6/19/2014 - Replaced cAppMode with TempVars.Item("UserAccessLevel") -' ================================= - -' --------------------------------- -' SUB: Form_Open -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John Boetsch - NCCN Landbirds db -' Adapted: Bonnie Campbell, May 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/19/2014 - Replaced cAppMode with TempVars.Item("UserAccessLevel") -' BLC, 7/29/2014 - updated to use TempVars.Item("Park") vs. cPark -' --------------------------------- -Private Sub Form_Open(Cancel As Integer) - On Error GoTo Err_Handler - - If SwitchboardIsOpen Then - Select Case TempVars.item("UserAccessLevel") - Case "read only" - ' Disable edit controls for "read only" application status - Me.AllowAdditions = False - Me.AllowEdits = False - End Select - End If - - If Me.OpenArgs <> "" Then - Me.cmbPark = Me.OpenArgs - ElseIf SwitchboardIsOpen Then - Me.cmbPark = TempVars.item("Park") '[Forms]![frm_Switchboard]![cPark] - Else: - Me.cmbPark.SetFocus - End If - If Me.DataEntry = False Then Me.cmbPark.Locked = True - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -Private Sub cmbLocation_ID_GotFocus() - On Error GoTo Err_Handler - - Me.ActiveControl.Requery - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -Private Sub cmbLocation_ID_NotInList(NewData As String, Response As Integer) - On Error GoTo Err_Handler - - Me.ActiveControl.Undo - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -Private Sub cmbLocation_ID_BeforeUpdate(Cancel As Integer) - On Error GoTo Err_Handler - - Dim strCondition As String - - If Not Me.NewRecord Then - ' Confirm changes to the location if not a new record - If MsgBox("Are you sure you want to change the location associated with this task?", _ - vbYesNo + vbDefaultButton2, "Confirm point change") = vbNo Then - DoCmd.CancelEvent - Me.cmbLocation_ID.Undo - End If - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -Private Sub Form_BeforeUpdate(Cancel As Integer) - On Error GoTo Err_Handler - - ' Validate the record before updating -'FIX -' If IsNull(Me.Location_ID) Then -' MsgBox "Please enter the sample location associated with task" & _ -' vbCrLf & " or hit ESC to undo changes to the record", vbOKOnly, "Validation error" -' Me.cmbLocation_ID.SetFocus -' DoCmd.CancelEvent -' GoTo Exit_Procedure -' ElseIf IsNull(Me.Request_date) Then -' MsgBox "Please enter the request date for the task", vbOKOnly, "Validation error" -' Me.txtRequest_date.SetFocus -' DoCmd.CancelEvent -' GoTo Exit_Procedure -' ElseIf IsNull(Me.Task_desc) Then -' MsgBox "Please enter a brief task description", vbOKOnly, "Validation error" -' Me.txtTask_desc.SetFocus -' DoCmd.CancelEvent -' GoTo Exit_Procedure -' ElseIf IsNull(Me.Task_status) Then -' MsgBox "Please enter the task status", vbOKOnly, "Validation error" -' Me.cmbTask_status.SetFocus -' DoCmd.CancelEvent -' GoTo Exit_Procedure -' ElseIf Me.Task_status = "Complete" And IsNull(Me.txtDate_completed) Then -' MsgBox "Please enter the completion date", vbOKOnly, "Validation error" -' Me.txtDate_completed.SetFocus -' DoCmd.CancelEvent -' GoTo Exit_Procedure -' ElseIf Me.Task_status <> "Complete" And Not IsNull(Me.txtDate_completed) Then -' MsgBox "Either the task status should be 'Complete' or" & vbCrLf & _ -' "the completion date should be blank.", vbOKOnly, "Validation error" -' Me.cmbTask_status.SetFocus -' DoCmd.CancelEvent -' GoTo Exit_Procedure -' End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -Private Sub Form_Close() - On Error GoTo Err_Handler - - gvarRefForm.Requery - -Exit_Procedure: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case 91 ' Do nothing - object variable not set - Case 2467 ' Do nothing - object does not exist - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - End Select - Resume Exit_Procedure - -End Sub diff --git a/source/forms/_frm_Unknown_Species.bas b/source/forms/_frm_Unknown_Species.bas deleted file mode 100644 index d39382f..0000000 --- a/source/forms/_frm_Unknown_Species.bas +++ /dev/null @@ -1,1035 +0,0 @@ -Version =20 -VersionRequired =20 -Begin Form - PopUp = NotDefault - Modal = NotDefault - RecordSelectors = NotDefault - AutoCenter = NotDefault - NavigationButtons = NotDefault - DividingLines = NotDefault - KeyPreview = NotDefault - AllowDesignChanges = NotDefault - DefaultView =0 - ScrollBars =0 - TabularFamily =124 - PictureAlignment =2 - DatasheetGridlinesBehavior =3 - Cycle =1 - GridX =24 - GridY =24 - Width =11520 - DatasheetFontHeight =9 - ItemSuffix =46 - Left =3825 - Top =3750 - Right =18345 - Bottom =14745 - DatasheetGridlinesColor =12632256 - Filter ="[Unknown_ID]='20110415113257-756092607.975006'" - RecSrcDt = Begin - 0xedfd33e8cd12e340 - End - RecordSource ="tbl_Unknown_Species" - Caption ="frm_Unknown_Species" - BeforeInsert ="[Event Procedure]" - OnClose ="[Event Procedure]" - DatasheetFontName ="Arial" - PrtMip = Begin - 0xa0050000a0050000a0050000a005000000000000201c0000e010000001000000 , - 0x010000006801000000000000a10700000100000001000000 - End - OnKeyDown ="[Event Procedure]" - OnLoad ="[Event Procedure]" - FilterOnLoad =0 - DatasheetGridlinesColor12 =12632256 - Begin - Begin Label - BackStyle =0 - BackColor =-2147483633 - ForeColor =-2147483630 - End - Begin Rectangle - SpecialEffect =3 - BackStyle =0 - BorderLineStyle =0 - End - Begin Image - BackStyle =0 - OldBorderStyle =0 - BorderLineStyle =0 - PictureAlignment =2 - End - Begin CommandButton - FontSize =8 - FontWeight =400 - FontName ="MS Sans Serif" - BorderLineStyle =0 - End - Begin OptionButton - SpecialEffect =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - End - Begin CheckBox - SpecialEffect =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - End - Begin OptionGroup - SpecialEffect =3 - BorderLineStyle =0 - End - Begin BoundObjectFrame - SpecialEffect =2 - OldBorderStyle =0 - BorderLineStyle =0 - BackStyle =0 - End - Begin TextBox - FELineBreak = NotDefault - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - AsianLineBreak =255 - End - Begin ListBox - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - End - Begin ComboBox - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - End - Begin Subform - SpecialEffect =2 - BorderLineStyle =0 - End - Begin UnboundObjectFrame - SpecialEffect =2 - OldBorderStyle =1 - End - Begin ToggleButton - FontSize =8 - FontWeight =400 - FontName ="MS Sans Serif" - BorderLineStyle =0 - End - Begin Tab - BackStyle =0 - BorderLineStyle =0 - End - Begin FormHeader - Height =0 - BackColor =-2147483633 - Name ="FormHeader" - End - Begin Section - Height =7200 - BackColor =-2147483633 - Name ="Detail" - Begin - Begin TextBox - Visible = NotDefault - OverlapFlags =93 - IMESentenceMode =3 - Left =10140 - Top =120 - Width =570 - ColumnWidth =2310 - Name ="Unknown_ID" - ControlSource ="Unknown_ID" - StatusBarText ="Unique record identifier - primary key" - - End - Begin TextBox - Visible = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =10800 - Top =120 - Width =570 - ColumnWidth =2310 - TabIndex =1 - Name ="Species_ID" - ControlSource ="Species_ID" - StatusBarText ="Foreign key to tbl_Quadrat_Species" - - End - Begin TextBox - OverlapFlags =87 - IMESentenceMode =3 - Left =1980 - Top =1620 - Width =6000 - TabIndex =6 - Name ="Plant_Description" - ControlSource ="Plant_Description" - StatusBarText ="General description" - - Begin - Begin Label - OldBorderStyle =1 - OverlapFlags =93 - Left =180 - Top =1620 - Width =1800 - Height =240 - FontWeight =700 - Name ="Plant_Description_Label" - Caption ="General Description" - End - End - End - Begin TextBox - OverlapFlags =87 - IMESentenceMode =3 - Left =2040 - Top =2100 - Width =7320 - TabIndex =8 - Name ="Salient_Feature" - ControlSource ="Salient_Feature" - StatusBarText ="Most salient feature" - - Begin - Begin Label - OldBorderStyle =1 - OverlapFlags =93 - Left =180 - Top =2100 - Width =1860 - Height =240 - FontWeight =700 - Name ="Salient_Feature_Label" - Caption ="Most Salient Feature" - End - End - End - Begin TextBox - OverlapFlags =87 - IMESentenceMode =3 - Left =1140 - Top =2580 - Width =3180 - ColumnWidth =2310 - TabIndex =9 - Name ="Leaf_Type" - ControlSource ="Leaf_Type" - StatusBarText ="Leaf type: compound/simple, arrangement" - - Begin - Begin Label - OldBorderStyle =1 - OverlapFlags =93 - Left =180 - Top =2580 - Width =960 - Height =240 - FontWeight =700 - Name ="Leaf_Type_Label" - Caption ="Leaf Type" - End - End - End - Begin TextBox - OverlapFlags =215 - IMESentenceMode =3 - Left =1260 - Top =3060 - Width =3060 - ColumnWidth =2310 - TabIndex =10 - Name ="Margin" - ControlSource ="Margin" - StatusBarText ="Leaf margin" - - Begin - Begin Label - OldBorderStyle =1 - OverlapFlags =93 - Left =180 - Top =3060 - Width =1110 - Height =240 - FontWeight =700 - Name ="Margin_Label" - Caption ="Leaf Margin" - End - End - End - Begin TextBox - OverlapFlags =87 - IMESentenceMode =3 - Left =2520 - Top =3540 - Width =6840 - TabIndex =11 - Name ="Other_Characteristics" - ControlSource ="Other_Characteristics" - StatusBarText ="Other leaf characteristics: pubescence, sap, stipules" - - Begin - Begin Label - OldBorderStyle =1 - OverlapFlags =93 - Left =180 - Top =3540 - Width =2340 - Height =240 - FontWeight =700 - Name ="Other_Characteristics_Label" - Caption ="Other Leaf Characteristics" - End - End - End - Begin TextBox - OverlapFlags =87 - IMESentenceMode =3 - Left =2040 - Top =4020 - Width =7320 - TabIndex =12 - Name ="Stem_Characteristics" - ControlSource ="Stem_Characteristics" - StatusBarText ="Stem characteristics: shape, pubescence, bud" - - Begin - Begin Label - OldBorderStyle =1 - OverlapFlags =93 - Left =180 - Top =4020 - Width =1860 - Height =240 - FontWeight =700 - Name ="Stem_Characteristics_Label" - Caption ="Stem Characteristics" - End - End - End - Begin TextBox - OverlapFlags =87 - IMESentenceMode =3 - Left =2160 - Top =4500 - Width =7200 - TabIndex =13 - Name ="Flower_Characteristics" - ControlSource ="Flower_Characteristics" - StatusBarText ="Flower characteristics: color location floral formula" - - Begin - Begin Label - OldBorderStyle =1 - OverlapFlags =93 - Left =180 - Top =4500 - Width =1980 - Height =240 - FontWeight =700 - Name ="Flower_Characteristics_Label" - Caption ="Flower Characteristics" - End - End - End - Begin TextBox - OverlapFlags =87 - IMESentenceMode =3 - Left =3720 - Top =4980 - Width =5640 - TabIndex =14 - Name ="General_Characteristics" - ControlSource ="General_Characteristics" - StatusBarText ="General and microhabitat characteristics" - - Begin - Begin Label - OldBorderStyle =1 - OverlapFlags =93 - Left =180 - Top =4980 - Width =3540 - Height =240 - FontWeight =700 - Name ="General_Characteristics_Label" - Caption ="General and Microhabitat Characteristics" - End - End - End - Begin CheckBox - OverlapFlags =93 - Left =1200 - Top =5520 - Width =735 - Height =300 - TabIndex =15 - Name ="Collected" - ControlSource ="Collected" - StatusBarText ="Was plant collected" - - Begin - Begin Label - OldBorderStyle =1 - OverlapFlags =85 - Left =180 - Top =5460 - Width =960 - Height =240 - FontWeight =700 - Name ="Collected_Label" - Caption ="Collected?" - End - End - End - Begin TextBox - OverlapFlags =87 - IMESentenceMode =3 - Left =1260 - Top =5940 - Width =2310 - ColumnWidth =2310 - TabIndex =19 - Name ="Best_Guess" - ControlSource ="Best_Guess" - StatusBarText ="Best guess species name" - - Begin - Begin Label - OldBorderStyle =1 - OverlapFlags =93 - Left =180 - Top =5940 - Width =1080 - Height =240 - FontWeight =700 - Name ="Best_Guess_Label" - Caption ="Best Guess" - End - End - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =4020 - Top =120 - Width =3420 - Height =420 - FontSize =14 - FontWeight =700 - Name ="Label28" - Caption ="Unknown Plant Species" - End - Begin ComboBox - RowSourceTypeInt =1 - OverlapFlags =87 - IMESentenceMode =3 - ListWidth =675 - Left =1200 - Top =1140 - Width =1380 - TabIndex =3 - Name ="Plant_Type" - ControlSource ="Plant_Type" - RowSourceType ="Value List" - RowSource ="\"herb\";\"shrub\";\"tree\";\"grass\";\"sedge\";\"other\"" - ColumnWidths ="675" - - Begin - Begin Label - OverlapFlags =93 - Left =180 - Top =1140 - Width =1020 - Height =245 - FontWeight =700 - Name ="Plant Type_Label" - Caption ="Plant Type" - EventProcPrefix ="Plant_Type_Label" - End - End - End - Begin CommandButton - OverlapFlags =247 - Left =9300 - Top =180 - Width =1020 - Height =300 - TabIndex =24 - Name ="ButtonClose" - Caption ="Close Form" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - Overlaps =1 - End - Begin TextBox - OverlapFlags =87 - IMESentenceMode =3 - Left =1620 - Top =660 - TabIndex =2 - Name ="Unknown_Code" - ControlSource ="Unknown_Code" - StatusBarText ="Temporary code for unknown species" - - Begin - Begin Label - OverlapFlags =93 - Left =180 - Top =660 - Width =1440 - Height =240 - FontWeight =700 - Name ="Label32" - Caption ="Unknown_Code:" - End - End - End - Begin ComboBox - OverlapFlags =85 - IMESentenceMode =3 - ColumnCount =2 - ListWidth =3600 - Left =1740 - Top =6420 - Width =2580 - TabIndex =21 - ColumnInfo ="\"\";\"\";\"\";\"\";\"10\";\"100\"" - Name ="Confirmed_Code" - ControlSource ="Confirmed_Code" - RowSourceType ="Table/Query" - RowSource ="SELECT tlu_NCPN_Plants.Master_PLANT_Code, tlu_NCPN_Plants.Utah_Species FROM tlu_" - "NCPN_Plants WHERE (((tlu_NCPN_Plants.Utah_PLANT_Code) Is Not Null)) ORDER BY tlu" - "_NCPN_Plants.Utah_Species; " - ColumnWidths ="0;3600" - - Begin - Begin Label - OldBorderStyle =1 - OverlapFlags =85 - Left =180 - Top =6420 - Width =1545 - Height =245 - FontWeight =700 - Name ="Confirmed To Be_Label" - Caption ="Confirmed To Be" - EventProcPrefix ="Confirmed_To_Be_Label" - End - End - End - Begin TextBox - OverlapFlags =87 - IMESentenceMode =3 - Left =9240 - Top =6420 - Width =1260 - TabIndex =23 - Name ="Identified_Date" - ControlSource ="Identified_Date" - Format ="Short Date" - StatusBarText ="Date of identification - Line point form" - InputMask ="99/99/0000;0;_" - - Begin - Begin Label - OldBorderStyle =1 - OverlapFlags =93 - TextAlign =2 - Left =7860 - Top =6420 - Width =1380 - Height =240 - FontWeight =700 - Name ="Label38" - Caption ="Identified Date" - End - End - End - Begin ComboBox - LimitToList = NotDefault - RowSourceTypeInt =1 - OverlapFlags =87 - IMESentenceMode =3 - ListWidth =795 - Left =4560 - Top =1140 - Width =1200 - TabIndex =4 - Name ="Forb_Grass_Type" - ControlSource ="Forb_Grass_Type" - RowSourceType ="Value List" - RowSource ="\"annual\";\"perennial\"" - ColumnWidths ="795" - - Begin - Begin Label - OverlapFlags =93 - Left =2880 - Top =1140 - Width =1680 - Height =245 - FontWeight =700 - Name ="Forbs and Grasses_Label" - Caption ="Forbs and Grasses" - EventProcPrefix ="Forbs_and_Grasses_Label" - End - End - End - Begin ComboBox - LimitToList = NotDefault - RowSourceTypeInt =1 - OverlapFlags =85 - IMESentenceMode =3 - ListWidth =1050 - Left =7680 - Top =1140 - TabIndex =5 - Name ="Perennial_Grasses" - ControlSource ="Perennial_Grasses" - RowSourceType ="Value List" - RowSource ="\"bunchgrass\";\"rhizomatous\"" - ColumnWidths ="1050" - - Begin - Begin Label - OverlapFlags =85 - Left =6060 - Top =1140 - Width =1575 - Height =245 - FontWeight =700 - Name ="Perennial Grasses_Label" - Caption ="Perennial Grasses" - EventProcPrefix ="Perennial_Grasses_Label" - End - End - End - Begin ComboBox - LimitToList = NotDefault - OverlapFlags =119 - IMESentenceMode =3 - ColumnCount =3 - ListWidth =1980 - Left =2880 - Top =5460 - Width =1620 - TabIndex =16 - Name ="Collected_by" - ControlSource ="Collected_by" - RowSourceType ="Table/Query" - RowSource ="SELECT tlu_Contacts.Contact_ID, tlu_Contacts.Last_Name, tlu_Contacts.First_Name " - "FROM tlu_Contacts WHERE (((tlu_Contacts.Active)=1)); " - ColumnWidths ="0;990;990" - - Begin - Begin Label - OverlapFlags =255 - Left =1680 - Top =5460 - Width =1200 - Height =245 - FontWeight =700 - Name ="Collected by_Label" - Caption ="Collected by" - EventProcPrefix ="Collected_by_Label" - End - End - End - Begin CheckBox - OverlapFlags =85 - Left =4680 - Top =6000 - TabIndex =20 - Name ="Have_Photos" - ControlSource ="Have_Photos" - StatusBarText ="Are there photos? - Line point form" - - LayoutCachedLeft =4680 - LayoutCachedTop =6000 - LayoutCachedWidth =4940 - LayoutCachedHeight =6240 - Begin - Begin Label - OverlapFlags =85 - Left =3840 - Top =5940 - Width =780 - Height =240 - FontWeight =700 - Name ="Label42" - Caption ="Photos" - LayoutCachedLeft =3840 - LayoutCachedTop =5940 - LayoutCachedWidth =4620 - LayoutCachedHeight =6180 - End - End - End - Begin TextBox - OverlapFlags =87 - IMESentenceMode =3 - Left =10380 - Top =1620 - Width =420 - TabIndex =7 - Name ="Position" - ControlSource ="Position" - StatusBarText ="Position on Transect (m)" - - Begin - Begin Label - OverlapFlags =93 - TextAlign =2 - Left =8280 - Top =1620 - Width =2100 - Height =240 - FontWeight =700 - Name ="Label39" - Caption ="Position onTransect (m)" - End - End - End - Begin ComboBox - LimitToList = NotDefault - OverlapFlags =87 - IMESentenceMode =3 - ColumnCount =3 - ListWidth =1980 - Left =5760 - Top =6420 - Width =1860 - TabIndex =22 - Name ="Identified_by" - ControlSource ="Identified_by" - RowSourceType ="Table/Query" - RowSource ="SELECT tlu_Contacts.Contact_ID, tlu_Contacts.Last_Name, tlu_Contacts.First_Name " - "FROM tlu_Contacts WHERE (((tlu_Contacts.Active)=1)); " - ColumnWidths ="0;990;990" - - Begin - Begin Label - OverlapFlags =93 - Left =4560 - Top =6420 - Width =1200 - Height =245 - FontWeight =700 - Name ="Label41" - Caption ="Identified by" - End - End - End - Begin ComboBox - LimitToList = NotDefault - RowSourceTypeInt =1 - OverlapFlags =85 - IMESentenceMode =3 - ListWidth =2055 - Left =5640 - Top =5460 - Width =2100 - Height =255 - TabIndex =17 - Name ="Method" - ControlSource ="Method" - RowSourceType ="Value List" - RowSource ="\"Point Intercept\";\"Exotic Frequency\";\"1-m Belt Shrubs\";\"1-m Belt Seedling" - "s\";\"1-m Belt Species Richness\";\"5-m Belt Saplings\";\"Overstory Census\";\"S" - "ite Impact Exotic Species\"" - ColumnWidths ="2055" - - LayoutCachedLeft =5640 - LayoutCachedTop =5460 - LayoutCachedWidth =7740 - LayoutCachedHeight =5715 - Begin - Begin Label - OverlapFlags =85 - Left =4800 - Top =5460 - Width =720 - Height =245 - FontWeight =700 - Name ="Method_Label" - Caption ="Method" - LayoutCachedLeft =4800 - LayoutCachedTop =5460 - LayoutCachedWidth =5520 - LayoutCachedHeight =5705 - End - End - End - Begin ComboBox - LimitToList = NotDefault - RowSourceTypeInt =1 - OverlapFlags =85 - IMESentenceMode =3 - ListWidth =270 - Left =9720 - Top =5460 - Width =660 - Height =255 - TabIndex =18 - Name ="Transect_Number" - ControlSource ="Transect_Number" - RowSourceType ="Value List" - RowSource ="1;2;3" - ColumnWidths ="270" - - LayoutCachedLeft =9720 - LayoutCachedTop =5460 - LayoutCachedWidth =10380 - LayoutCachedHeight =5715 - Begin - Begin Label - OverlapFlags =85 - Left =8040 - Top =5460 - Width =1590 - Height =245 - FontWeight =700 - Name ="Transect Number_Label" - Caption ="Transect Number" - EventProcPrefix ="Transect_Number_Label" - LayoutCachedLeft =8040 - LayoutCachedTop =5460 - LayoutCachedWidth =9630 - LayoutCachedHeight =5705 - End - End - End - End - End - Begin FormFooter - Height =0 - BackColor =-2147483633 - Name ="FormFooter" - End - End -End -CodeBehindForm -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = True -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -' ================================= -' MODULE: Form_UnknownSpecies -' Description: Unknown species properties, events, functions & procedures -' -' Source/date: Bonnie Campbell, July 5, 2016 -' Revisions: BLC - 7/5/2016 - initial version adapted from Upland frm_Unknown_Species -' ================================= - -'================================================================= -' Properties -'================================================================= - -'================================================================= -' Subroutines & Functions -'================================================================= - -' --------------------------------- -' SUB: Form_Load -' Description: Unknown species form load action -' Assumptions: none -' Parameters: N/A -' Returns: N/A -' Throws: none -' References: none -' Source/date: -' Adapted: Bonnie Campbell, July 5, 2016 - for NCPN tools -' Revisions: -' BLC - 7/5/2016 - initial version -' BLC - 7/5/2016 - adjusted for big rivers & new form name SpeciesSearch vs. frmSpeciesSearch -' --------------------------------- -Private Sub Form_Load() -On Error GoTo Err_Handler - - -Exit_Handler: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Form_Load[UnknownSpecies form])" - End Select - Resume Exit_Handler -End Sub - -' --------------------------------- -' SUB: Form_KeyDown -' Description: handles form's key down actions -' Parameters: -' Returns: - -' Assumptions: - -' Throws: none -' References: - -' Source/date: Bonnie Campbell, August 2015 -' Revisions: BLC, 8/21/2014 - initial version -' BLC, 7/5/2016 - adapted for big rivers -' --------------------------------- -Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) -On Error GoTo Err_Handler - - 'capture ESC & let user determine if fields should be cleared - CaptureEscapeKey KeyCode - -Exit_Handler: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Form_KeyDown[Form_frm_Unknown_Species])" - End Select - Resume Exit_Handler -End Sub - -' --------------------------------- -' SUB: Form_BeforeInsert -' Description: handles form's pre-insert actions -' Parameters: -' Returns: - -' Assumptions: - -' Throws: none -' References: - -' Source/date: Bonnie Campbell, August 2015 -' Revisions: BLC, 8/21/2014 - initial version -' BLC, 7/5/2016 - adapted for big rivers, added documentation -' --------------------------------- -Private Sub Form_BeforeInsert(Cancel As Integer) -On Error GoTo Err_Handler - - ' Create the GUID primary key value - If IsNull(Me!Unknown_ID) Then - If GetDataType("tbl_Unknown_Species", "Unknown_ID") = dbText Then - Me.Unknown_ID = fxnGUIDGen - End If - End If - -Exit_Handler: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Form_BeforeInsert[UnknownSpecies form])" - End Select - Resume Exit_Handler -End Sub - -' --------------------------------- -' SUB: UnknownCode_AfterUpdate -' Description: Handles unknown code after update actions -' Parameters: -' Returns: - -' Assumptions: - -' Throws: none -' References: - -' Source/date: Bonnie Campbell, August 2015 -' Revisions: BLC, 8/21/2014 - initial version -' BLC, 7/5/2016 - adapted for big rivers -' --------------------------------- -Private Sub tbxUnknown_Code_AfterUpdate() -On Error GoTo Err_Handler - - If Not IsNull(Me!Unknown_Code) Then - If Left(Me!Unknown_Code, 3) <> "UNK" Then - MsgBox "Unknown code must be prefixed by UNK.", , "Unknown Code" - ' DoCmd.CancelEvent - ' SendKeys "{ESC}" - Me.Undo - ElseIf Not IsNull(DLookup("[Unknown_ID]", "tbl_Unknown_Species", "[Unknown_Code] = '" & Me.Unknown_Code & "'")) Then - MsgBox "Unknown code already exists in table.", , "Unknown Code" - Me.Undo - End If - End If - -Exit_Handler: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - tbxUnknownCode_AfterUpdate[UnknownSpecies form])" - End Select - Resume Exit_Handler -End Sub - -' --------------------------------- -' SUB: Form_Close -' Description: Handles btnClose click actions -' Parameters: -' Returns: - -' Assumptions: - -' Throws: none -' References: - -' Source/date: Bonnie Campbell, July 5, 2016 -' Revisions: BLC, 7/5/2016 - initial version -' --------------------------------- -Private Sub Form_Close() -On Error GoTo Err_Handler - - - -Exit_Handler: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Form_Close[UnknownSpecies form])" - End Select - Resume Exit_Handler -End Sub - -' --------------------------------- -' SUB: GetDataType -' Description: Retrieves data type of table field -' Parameters: strTableName - name of database table (string) -' strFieldName - name of table field (string) -' Returns: data type (integer) -' Assumptions: - -' Throws: none -' References: - -' Source/date: Unknown -' Revisions: Unknown - initial version -' BLC, 7/5/2016 - revised for big rivers -' --------------------------------- -Public Function GetDataType(strTableName As String, strFieldName As String) As Integer -On Error Resume Next - - Dim intResult As Integer - - intResult = CurrentDb.TableDefs(strTableName)(strFieldName).Type - GetDataType = intResult - -Exit_Handler: - Exit Function - -Err_Handler: - Select Case Err.Number - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - Form_Close[UnknownSpecies form])" - End Select - Resume Exit_Handler -End Function diff --git a/source/forms/_fsub_QA_Results.bas b/source/forms/_fsub_QA_Results.bas deleted file mode 100644 index 379bd87..0000000 --- a/source/forms/_fsub_QA_Results.bas +++ /dev/null @@ -1,866 +0,0 @@ -Version =20 -VersionRequired =20 -Begin Form - AllowFilters = NotDefault - AutoCenter = NotDefault - NavigationButtons = NotDefault - AllowDeletions = NotDefault - DividingLines = NotDefault - AllowAdditions = NotDefault - FilterOn = NotDefault - OrderByOn = NotDefault - ViewsAllowed =1 - TabularFamily =0 - PictureAlignment =2 - DatasheetGridlinesBehavior =3 - GridX =24 - GridY =24 - Width =26520 - DatasheetFontHeight =10 - ItemSuffix =23 - Left =840 - Top =2880 - Right =14730 - Bottom =12660 - DatasheetGridlinesColor =12632256 - Filter ="[Is_done] = False" - OrderBy ="Query_name" - RecSrcDt = Begin - 0x5dcbdb2ab6c4e440 - End - RecordSource ="SELECT tbl_QA_Results.* FROM tbl_QA_Results ORDER BY IIf([Is_done],2,1), tbl_QA_" - "Results.Query_name; " - Caption ="fsub_QA_Results" - OnOpen ="[Event Procedure]" - DatasheetFontName ="Arial" - PrtMip = Begin - 0xa0050000a0050000a0050000a005000000000000201c0000e010000001000000 , - 0x010000006801000000000000a10700000100000001000000 - End - AllowDatasheetView =0 - AllowPivotTableView =0 - AllowPivotChartView =0 - AllowPivotChartView =0 - FilterOnLoad =255 - AllowLayoutView =0 - DatasheetGridlinesColor12 =12632256 - Begin - Begin Label - BackStyle =0 - BackColor =-2147483633 - ForeColor =-2147483630 - End - Begin Rectangle - SpecialEffect =3 - BackStyle =0 - BorderLineStyle =0 - End - Begin Image - BackStyle =0 - OldBorderStyle =0 - BorderLineStyle =0 - PictureAlignment =2 - End - Begin CommandButton - FontSize =8 - FontWeight =400 - FontName ="MS Sans Serif" - BorderLineStyle =0 - End - Begin OptionButton - SpecialEffect =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - End - Begin CheckBox - SpecialEffect =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - End - Begin OptionGroup - SpecialEffect =3 - BorderLineStyle =0 - End - Begin BoundObjectFrame - SpecialEffect =2 - OldBorderStyle =0 - BorderLineStyle =0 - BackStyle =0 - End - Begin TextBox - FELineBreak = NotDefault - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - AsianLineBreak =255 - End - Begin ListBox - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - End - Begin ComboBox - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - End - Begin Subform - SpecialEffect =2 - BorderLineStyle =0 - End - Begin UnboundObjectFrame - SpecialEffect =2 - OldBorderStyle =1 - End - Begin ToggleButton - FontSize =8 - FontWeight =400 - FontName ="MS Sans Serif" - BorderLineStyle =0 - End - Begin Tab - BackStyle =0 - BorderLineStyle =0 - End - Begin FormHeader - CanGrow = NotDefault - Height =300 - BackColor =13025979 - Name ="FormHeader" - Begin - Begin Label - FontItalic = NotDefault - OverlapFlags =85 - TextAlign =2 - Left =120 - Top =60 - Width =1200 - Height =240 - FontWeight =700 - Name ="labQuery_name" - Caption ="Query name*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =4680 - Top =60 - Width =624 - Height =240 - Name ="labQuery_type" - Caption ="Type*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =6240 - Top =60 - Width =654 - Height =240 - Name ="labQuery_result" - Caption ="N recs*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =7042 - Top =60 - Width =1005 - Height =240 - Name ="labQuery_run_time" - Caption ="Last run time" - FontName ="Arial" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =8280 - Top =60 - Width =870 - Height =240 - Name ="labQuery_description" - Caption ="Description" - FontName ="Arial" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =14880 - Top =60 - Width =1059 - Height =240 - Name ="labRemedy_desc" - Caption ="Action taken" - FontName ="Arial" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =19020 - Top =60 - Width =1044 - Height =240 - Name ="labQA_user" - Caption ="Remedy by*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =21492 - Top =60 - Width =1350 - Height =240 - Name ="labQuery_expression" - Caption ="Query expression" - FontName ="Arial" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =20112 - Top =60 - Width =1164 - Height =240 - Name ="labRemedy_date" - Caption ="Remedy date*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - Tag ="DetachedLabel" - End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =5640 - Top =60 - Width =540 - Height =240 - Name ="labIs_done" - Caption ="Done*" - FontName ="Arial" - OnDblClick ="[Event Procedure]" - End - End - End - Begin Section - CanGrow = NotDefault - CanShrink = NotDefault - Height =300 - BackColor =-2147483633 - Name ="Detail" - Begin - Begin TextBox - Locked = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =60 - Top =60 - Width =4500 - ColumnWidth =3000 - ForeColor =16711680 - Name ="txtQuery_name" - ControlSource ="Query_name" - StatusBarText ="Name of the quality assurance query" - OnDblClick ="[Event Procedure]" - FontName ="Arial" - ConditionalFormat = Begin - 0x0100000086000000010000000100000000000000000000001200000001010000 , - 0x00000000ffffff00000000000000000000000000000000000000000000000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x5b00510075006500720079005f0072006500730075006c00740073005d003d00 , - 0x300000000000 - End - - ConditionalFormat14 = Begin - 0x01000100000001000000000000000101000000000000ffffff00110000005b00 , - 0x510075006500720079005f0072006500730075006c00740073005d003d003000 , - 0x000000000000000000000000000000000000000000 - End - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - TextAlign =2 - IMESentenceMode =3 - Left =6202 - Top =60 - Width =600 - ColumnWidth =2568 - TabIndex =2 - Name ="txtQuery_result" - ControlSource ="Query_result" - StatusBarText ="Query result as the number of records returned the last time the query was run" - OnDblClick ="[Event Procedure]" - FontName ="Arial" - ConditionalFormat = Begin - 0x010000006c000000020000000000000002000000000000000200000001000000 , - 0x00000000ffffff0000000000040000000300000005000000010100000000ff00 , - 0xffffff0000000000000000000000000000000000000000000000000000000000 , - 0x300000000000300000000000 - End - - ConditionalFormat14 = Begin - 0x01000200000000000000020000000100000000000000ffffff00010000003000 , - 0x0000000000000000000000000000000000000000000000000004000000010100 , - 0x000000ff00ffffff000100000030000000000000000000000000000000000000 , - 0x00000000 - End - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =6862 - Top =60 - Width =1320 - ColumnWidth =1896 - TabIndex =3 - Name ="txtQuery_run_time" - ControlSource ="Query_run_time" - Format ="mm/dd/yyyy hh:nn" - StatusBarText ="Run time of the query results" - FontName ="Arial" - - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - CanGrow = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =8220 - Top =60 - Width =6600 - ColumnWidth =3000 - TabIndex =4 - Name ="txtQuery_description" - ControlSource ="Query_description" - StatusBarText ="Description of the query" - FontName ="Arial" - - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - CanGrow = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =14880 - Top =60 - Width =4080 - ColumnWidth =3000 - TabIndex =5 - Name ="txtRemedy_desc" - ControlSource ="Remedy_desc" - StatusBarText ="Details about actions taken and/or not taken to resolve errors" - FontName ="Arial" - - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =19020 - Top =60 - Width =960 - ColumnWidth =2568 - TabIndex =6 - Name ="txtQA_user" - ControlSource ="QA_user" - StatusBarText ="Name of the person doing quality assurance" - FontName ="Arial" - - End - Begin ComboBox - Enabled = NotDefault - Locked = NotDefault - AllowAutoCorrect = NotDefault - RowSourceTypeInt =1 - OverlapFlags =85 - IMESentenceMode =3 - ColumnCount =2 - Left =4620 - Top =60 - Width =1140 - ColumnWidth =2568 - TabIndex =1 - ConditionalFormat = Begin - 0x0100000074000000020000000000000002000000000000000400000001010000 , - 0xff000000ffffff00000000000200000005000000090000000101010080008000 , - 0xffffff0000000000000000000000000000000000000000000000000000000000 , - 0x2200310022000000000022003200220000000000 - End - Name ="txtQuery_type" - ControlSource ="Query_type" - RowSourceType ="Value List" - RowSource ="1;Critical;2;Warning;3;Information" - ColumnWidths ="0;2160" - StatusBarText ="Severity of data errors being trapped: 1=critical, 2=warning, 3=information" - FontName ="Arial" - - ConditionalFormat14 = Begin - 0x010002000000000000000200000001010000ff000000ffffff00030000002200 , - 0x3100220000000000000000000000000000000000000000000000000000020000 , - 0x000101010080008000ffffff0003000000220032002200000000000000000000 , - 0x000000000000000000000000 - End - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - CanGrow = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =21420 - Top =60 - Width =5100 - TabIndex =8 - Name ="txtQuery_expression" - ControlSource ="Query_expression" - StatusBarText ="Description of the query" - FontName ="Arial" - - End - Begin TextBox - Enabled = NotDefault - Locked = NotDefault - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =20040 - Top =60 - Width =1320 - ColumnWidth =1680 - TabIndex =7 - Name ="txtRemedy_date" - ControlSource ="Remedy_date" - Format ="mm/dd/yyyy hh:nn" - StatusBarText ="When the remedy description was last edited" - FontName ="Arial" - - End - Begin CheckBox - OverlapFlags =85 - Left =5880 - Top =60 - Width =240 - TabIndex =9 - Name ="chkIs_done" - ControlSource ="Is_done" - ControlTipText ="Temporary flag to indicate that the user is done reviewing this query even if so" - "me records remain" - - End - End - End - Begin FormFooter - Height =0 - BackColor =-2147483633 - Name ="FormFooter" - End - End -End -CodeBehindForm -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = True -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Compare Database -Option Explicit - -' ================================= -' FORM NAME: fsub_QA_Results -' Description: Standard subform for viewing data validation results -' Data source: tbl_QA_Results -' Data access: edit only, no deletions -' Pages: none -' Functions: fxnOpenClickedQuery, fxnSortRecords -' References: none -' Source/date: John R. Boetsch, May 5, 2006 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: JRB, 12/17/2007 - updated fxnOpenClickedQuery; also added Is_done field -' JRB, 7/1/2008 - updated fxnSortRecords, added strSortFieldLabel2 -' JRB, 10/7/2008 - removed Form_DblClick; changed single click events on query -' name and results fields to double click events to avoid a run-time error -' JRB, 11/12/2008 - added an error trap to fxnOpenClickedQuery -' JRB, 2/23/2009 - added a condition to fxnOpenClickedQuery so query results will -' not be displayed if the selected timeframe does not equal the db timeframe -' ================================= - -Dim strSortField As String ' Keeps track of current sort settings -Dim strSortOrder As String -Dim strSortFieldLabel As String -Dim strSortFieldLabel2 As String - -' --------------------------------- -' SUB: Form_Open -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub Form_Open(Cancel As Integer) - On Error GoTo Err_Handler - - Dim varReturn As Variant - - ' On opening the form, set the initial sort order - strSortFieldLabel = "labQuery_name" - varReturn = fxnSortRecords("Query_name") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' ================================= -' The following several procedures re-sort the records if the user -' double-clicks on a field label - -' --------------------------------- -' SUB: labIs_done_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub labIs_done_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("Is_done") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: labQuery_name_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub labQuery_name_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("Query_name") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: labQuery_type_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub labQuery_type_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("Query_type") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -Private Sub labQuery_result_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("Query_result") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: labQA_user_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub labQA_user_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("QA_user") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: labRemedy_date_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub labRemedy_date_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnSortRecords ("Remedy_date") - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' ================================= -' The following several procedures open the selected query in the parent -' form after the user clicks - -' --------------------------------- -' SUB: txtQuery_name_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub txtQuery_name_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnOpenClickedQuery - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: txtQuery_result_DblClick -' Description: -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: John R. Boetsch, May 2008 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: BLC, 6/13/2014 - XX -' --------------------------------- -Private Sub txtQuery_result_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - - fxnOpenClickedQuery - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' FUNCTION: fxnOpenClickedQuery -' Description: opens the selected record for viewing and editing results -' Parameters: none -' Returns: none -' Throws: none -' References: none -' Source/date: John R. Boetsch, May 5, 2006 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: JRB, 8/2/2006 - added an error trap for error 2113 -' JRB, 12/17/2007 - updated the parent form filter to also filter on -' time frame -' JRB, 11/12/2008 - added an error trap in case of missing query object -' JRB, 2/23/2009 - added a condition to not display query results if the timeframe -' doesn't match the current timeframe string -' BLC, 7/29/2014 - updated to use TempVars.Item("Timeframe") vs. cTimeframe -' --------------------------------- -Private Function fxnOpenClickedQuery() - On Error GoTo Err_Handler - - ' Make sure a query is selected - If IsNull(Me.txtQuery_name) Then - MsgBox "No query selected", vbOKOnly - Else - ' Set the object selector to the selected query - Me.Parent.Form!selObject = Me.txtQuery_name - ' Bind the subform to the selected query - only if matching the current timeframe - If Me.Time_frame = TempVars.item("Timeframe") Then - Me.Parent.Form!subQueryResults.SourceObject = "Query." & Me.txtQuery_name - End If - ' Set the form to the selected record - Me.Parent.Form.Filter = "[Query_name] = """ & Me.txtQuery_name & _ - """ AND [Time_frame] = """ & Me.Time_frame & """" - Me.Parent.Form.FilterOn = True - Me.Parent.Form.AllowAdditions = False - Me.Parent.pgQueryViews.SetFocus - Me.Form.OrderByOn = True - End If - -Exit_Procedure: - Exit Function - -Err_Handler: - Select Case Err.Number - Case 2113 ' No results set records available - ' Do nothing - Case 3011, 7874 ' The query object isn't found - MsgBox "This query is no longer available in the application." & _ - vbCrLf & """" & Me.txtQuery_name & """", , "Query not found" - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - fxnOpenClickedQuery)" - End Select - Resume Exit_Procedure - -End Function - -' --------------------------------- -' FUNCTION: fxnSortRecords -' Description: Sorts the records by the indicated field -' Parameters: strFieldName -' Returns: none -' Throws: none -' References: strFieldName, strSortOrder, strSortFieldLabel -' (form-level variables) -' Source/date: John R. Boetsch, May 5, 2006 -' Adapted: Bonnie Campbell, June, 2014 for NCPN WQ Utilities tool -' Revisions: JRB, 7/1/2008 - documentation and sorting by second field -' --------------------------------- -Private Function fxnSortRecords(ByVal strFieldName As String, _ - Optional ByVal strField2Name As String) - On Error GoTo Err_Handler - - Dim strOrderBy As String - - ' If already sorting in ascending order by this field, sort descending - If strFieldName = strSortField And strSortOrder = "" Then - strSortOrder = " DESC" - Else: strSortOrder = "" - End If - ' Create the order by string and activate the filter - strOrderBy = strFieldName & strSortOrder - If strField2Name <> "" Then - strOrderBy = strOrderBy & ", " & strField2Name - End If - strSortField = strFieldName - Me.Form.OrderBy = strOrderBy - Me.Form.OrderByOn = True - - ' Change the label format to indicate the sorted field - Me.Controls.item(strSortFieldLabel).FontItalic = False - Me.Controls.item(strSortFieldLabel).fontBold = False - strSortFieldLabel = "lab" & strFieldName - Me.Controls.item(strSortFieldLabel).FontItalic = True - Me.Controls.item(strSortFieldLabel).fontBold = True - ' Do the same for the second sort field, if applicable - If strField2Name <> "" Then - Me.Controls.item(strSortFieldLabel2).FontItalic = False - Me.Controls.item(strSortFieldLabel2).fontBold = False - strSortFieldLabel = "lab" & strField2Name - Me.Controls.item(strSortFieldLabel2).FontItalic = True - Me.Controls.item(strSortFieldLabel2).fontBold = True - End If - -Exit_Procedure: - Exit Function - -Err_Handler: - Select Case Err.Number - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - fxnSortRecords)" - End Select - Resume Exit_Procedure - -End Function diff --git a/source/forms/_fsub_Task_List_Browser.bas b/source/forms/_fsub_Task_List_Browser.bas deleted file mode 100644 index 98a4b05..0000000 --- a/source/forms/_fsub_Task_List_Browser.bas +++ /dev/null @@ -1,672 +0,0 @@ -Version =20 -VersionRequired =20 -Begin Form - AllowFilters = NotDefault - MaxButton = NotDefault - MinButton = NotDefault - AutoCenter = NotDefault - ViewsAllowed =1 - BorderStyle =1 - PictureAlignment =2 - DatasheetGridlinesBehavior =3 - Cycle =1 - GridX =24 - GridY =24 - Width =14160 - ItemSuffix =20 - Right =7995 - Bottom =11385 - DatasheetForeColor =33554432 - DatasheetGridlinesColor =12632256 - RecSrcDt = Begin - 0x21cadc2ab6c4e440 - End - OnDirty ="[Event Procedure]" - RecordSource ="SELECT tbl_Task_List.* FROM tbl_Task_List ORDER BY tbl_Task_List.Task_status, tb" - "l_Task_List.Request_date DESC; " - Caption =" Sample Location Task Item" - OnDelete ="[Event Procedure]" - BeforeUpdate ="[Event Procedure]" - OnOpen ="[Event Procedure]" - DatasheetFontName ="Arial" - PrtMip = Begin - 0xa0050000a0050000a0050000a005000000000000201c0000e010000001000000 , - 0x010000006801000000000000a10700000100000001000000 - End - OnDblClick ="[Event Procedure]" - AllowDatasheetView =0 - AllowPivotTableView =0 - AllowPivotChartView =0 - AllowPivotChartView =0 - FilterOnLoad =0 - AllowLayoutView =0 - DatasheetGridlinesColor12 =12632256 - DatasheetForeColor12 =33554432 - Begin - Begin Label - BackStyle =0 - BackColor =-2147483633 - ForeColor =-2147483630 - End - Begin Rectangle - SpecialEffect =3 - BackStyle =0 - BorderLineStyle =0 - End - Begin Image - BackStyle =0 - OldBorderStyle =0 - BorderLineStyle =0 - PictureAlignment =2 - End - Begin CommandButton - FontSize =8 - FontWeight =400 - FontName ="MS Sans Serif" - BorderLineStyle =0 - End - Begin OptionButton - SpecialEffect =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - End - Begin CheckBox - SpecialEffect =2 - BorderLineStyle =0 - LabelX =230 - LabelY =-30 - End - Begin OptionGroup - SpecialEffect =3 - BorderLineStyle =0 - End - Begin BoundObjectFrame - SpecialEffect =2 - OldBorderStyle =0 - BorderLineStyle =0 - BackStyle =0 - End - Begin TextBox - FELineBreak = NotDefault - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - AsianLineBreak =255 - End - Begin ListBox - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - End - Begin ComboBox - SpecialEffect =2 - BorderLineStyle =0 - BackColor =-2147483643 - ForeColor =-2147483640 - End - Begin Subform - SpecialEffect =2 - BorderLineStyle =0 - End - Begin UnboundObjectFrame - SpecialEffect =2 - OldBorderStyle =1 - End - Begin ToggleButton - FontSize =8 - FontWeight =400 - FontName ="MS Sans Serif" - BorderLineStyle =0 - End - Begin Tab - BackStyle =0 - BorderLineStyle =0 - End - Begin Section - Height =1020 - BackColor =13025979 - Name ="Detail" - Begin - Begin TextBox - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =60 - Top =360 - Width =900 - Height =252 - ColumnWidth =1932 - TabIndex =1 - Name ="txtRequest_date" - ControlSource ="Request_date" - Format ="Short Date" - StatusBarText ="Date of the task request" - FontName ="Tahoma" - - Begin - Begin Label - OverlapFlags =85 - Left =60 - Top =60 - Width =1380 - Height =255 - Name ="labRequest_date" - Caption ="Request date / by" - FontName ="Tahoma" - End - End - End - Begin TextBox - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =1860 - Top =348 - Width =2460 - Height =612 - ColumnWidth =5832 - TabIndex =3 - Name ="txtTask_desc" - ControlSource ="Task_desc" - StatusBarText ="Brief description of the task" - FontName ="Tahoma" - - Begin - Begin Label - OverlapFlags =85 - Left =1860 - Top =60 - Width =1440 - Height =252 - Name ="labTask_desc" - Caption ="Brief description" - FontName ="Tahoma" - End - End - End - Begin TextBox - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - Left =9000 - Top =720 - Height =252 - ColumnWidth =1236 - TabIndex =7 - Name ="txtDate_completed" - ControlSource ="Date_completed" - StatusBarText ="Date the task was completed" - FontName ="Tahoma" - - Begin - Begin Label - OverlapFlags =85 - Left =7620 - Top =720 - Width =1332 - Height =252 - Name ="labDate_completed" - Caption ="Date completed" - FontName ="Tahoma" - End - End - End - Begin TextBox - AllowAutoCorrect = NotDefault - ScrollBars =2 - OverlapFlags =85 - IMESentenceMode =3 - Left =4380 - Top =348 - Width =3168 - Height =612 - TabIndex =4 - Name ="txtTask_notes" - ControlSource ="Task_notes" - StatusBarText ="Notes about the task" - FontName ="Tahoma" - - Begin - Begin Label - OverlapFlags =85 - Left =4380 - Top =60 - Width =1080 - Height =252 - Name ="labTask_notes" - Caption ="Task notes" - FontName ="Tahoma" - End - End - End - Begin ComboBox - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - ColumnCount =2 - ListRows =20 - ListWidth =3600 - Left =60 - Top =720 - Width =1728 - Height =252 - ColumnWidth =1380 - TabIndex =2 - Name ="cmbRequested_by" - ControlSource ="Requested_by" - RowSourceType ="Table/Query" - RowSource ="SELECT tlu_Project_Crew.Contact_ID, IIf([Contact_is_active],'Active','') AS Is_a" - "ctive FROM tlu_Project_Crew ORDER BY IIf([Contact_is_active],'Active','') DESC ," - " tlu_Project_Crew.Contact_ID; " - ColumnWidths ="2592;1008" - StatusBarText ="Name of the person making the initial request" - FontName ="Tahoma" - - End - Begin ComboBox - AllowAutoCorrect = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - ColumnCount =2 - ListRows =20 - ListWidth =3600 - Left =9000 - Top =360 - Width =1848 - Height =252 - ColumnWidth =1620 - TabIndex =6 - Name ="cmbFollowup_by" - ControlSource ="Followup_by" - RowSourceType ="Table/Query" - RowSource ="SELECT tlu_Project_Crew.Contact_ID, IIf([Contact_is_active],'Active','') AS Is_a" - "ctive FROM tlu_Project_Crew ORDER BY IIf([Contact_is_active],'Active','') DESC ," - " tlu_Project_Crew.Contact_ID; " - ColumnWidths ="2592;1008" - StatusBarText ="Name of the person following up on or completing the task" - FontName ="Tahoma" - - Begin - Begin Label - OverlapFlags =85 - Left =9060 - Top =60 - Width =1140 - Height =252 - Name ="labFollowup_by" - Caption ="Follow-up by" - FontName ="Tahoma" - End - End - End - Begin TextBox - AllowAutoCorrect = NotDefault - ScrollBars =2 - OverlapFlags =85 - IMESentenceMode =3 - Left =10920 - Top =348 - Width =3168 - Height =612 - TabIndex =8 - Name ="txtFollowup_notes" - ControlSource ="Followup_notes" - StatusBarText ="Comments regarding what was done to follow-up on or complete this task" - FontName ="Tahoma" - - Begin - Begin Label - OverlapFlags =85 - Left =10920 - Top =60 - Width =1260 - Height =252 - Name ="labFollowup_notes" - Caption ="Follow-up notes" - FontName ="Tahoma" - End - End - End - Begin ComboBox - LimitToList = NotDefault - AllowAutoCorrect = NotDefault - RowSourceTypeInt =1 - OverlapFlags =85 - IMESentenceMode =3 - Left =7620 - Top =360 - Width =1260 - ColumnWidth =960 - TabIndex =5 - Name ="cmbTask_status" - ControlSource ="Task_status" - RowSourceType ="Value List" - RowSource ="Active;Complete;Inactive" - StatusBarText ="Status of the task" - DefaultValue ="\"Active\"" - FontName ="Tahoma" - - Begin - Begin Label - OverlapFlags =85 - Left =7620 - Top =60 - Width =1140 - Height =252 - Name ="labTask_status" - Caption ="Task status" - FontName ="Tahoma" - End - End - End - Begin CommandButton - OverlapFlags =85 - Left =1020 - Top =360 - Width =780 - Height =309 - Name ="cmdCloseup" - Caption ="Closeup" - OnClick ="[Event Procedure]" - FontName ="Arial" - ControlTipText ="Open this task record" - - WebImagePaddingLeft =2 - WebImagePaddingTop =2 - WebImagePaddingRight =1 - WebImagePaddingBottom =1 - End - End - End - End -End -CodeBehindForm -Attribute VB_GlobalNameSpace = False -Attribute VB_Creatable = True -Attribute VB_PredeclaredId = True -Attribute VB_Exposed = False -Option Compare Database -Option Explicit - -' ================================= -' FORM NAME: fsub_Task_List_Browser -' Description: Standard data browser subform for viewing and editing task records -' Data source: In-line SQL statement based on tbl_Task_List -' Data access: edit, add and delete -' Pages: none -' Functions: none -' References: none -' Source/date: John R. Boetsch, July 2007 -' Adapted: Bonnie Campbell, June 2014 -' Revisions: JRB, 1/22/2008 - added validation code, revised subform layout -' JRB, 7/31/2008 - documentation and standardization -' JRB, 11/12/2008 - updates to setting/requerying global variables; added -' Dirty and Delete events -' JRB, 12/28/2009 - updated Form_Open to only enable txtRequest_date when the -' parent form is the data browser -' BLC, 6/12/2014 - Revised to use TempVars.Item("UserAccessLevel") vs. cAppMode -' ================================= - -Dim ctlPark As Control ' the park control in the parent form - -' --------------------------------- -' SUB: Form_Open -' Description: Opens sub form & sets controls based on UserAccessLevel -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: Created John R. Boetsch, September 2008 -' Adapted 06/12/2014 Bonnie Campbell, June 2014 -' Revised 06/12/2014 blc; Last modified 06/12/2014 blc. -' Revisions: Bonnie Campbell, June 12, 2014 - Revised to use TempVars.Item("UserAccessLevel") vs. cAppMode -' --------------------------------- -Private Sub Form_Open(Cancel As Integer) - On Error GoTo Err_Handler - - ' Set the subform color depending on which form it belongs to - Select Case Me.Parent.Name - Case "frm_Data_Entry" - Me.Detail.BackColor = 13692912 ' light straw (main data entry form) - Set ctlPark = Me.Parent!cmbPark - Me.txtRequest_date.Enabled = False - Case "frm_Data_Browser" - Me.Detail.BackColor = 13027014 ' steel blue - Set ctlPark = Me.Parent!cmbPark_code - Me.txtRequest_date.Enabled = True - Me.txtRequest_date.DefaultValue = "=Date()" - Case Else - Me.Detail.BackColor = 13027014 ' steel blue - Set ctlPark = Me.Parent.Parent!cmbPark_code - Me.txtRequest_date.Enabled = False - End Select - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: Form_Open -' Description: Opens sub form & sets controls based on UserAccessLevel -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: Created John R. Boetsch, September 2008 -' Adapted 06/12/2014 Bonnie Campbell, June 2014 -' Revised 06/12/2014 blc; Last modified 06/12/2014 blc. -' Revisions: Bonnie Campbell, June 12, 2014 - Revised to use TempVars.Item("UserAccessLevel") vs. cAppMode -' --------------------------------- -Private Sub Form_Dirty(Cancel As Integer) - On Error GoTo Err_Handler - - ' Note: this event is ignored on inserting a new record if BeforeInsert code exists - - If TempVars.item("UserAccessLevel") = "read only" Then - ' Edits not allowed - Cancel = True - GoTo Exit_Procedure - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: Form_Delete -' Description: Deletes task record -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: Created John R. Boetsch, September 2008 -' Adapted 06/12/2014 Bonnie Campbell, June 2014 -' Revised 06/12/2014 blc; Last modified 06/12/2014 blc. -' Revisions: Bonnie Campbell, June 12, 2014 - Revised to use TempVars.Item("UserAccessLevel") vs. cAppMode -' --------------------------------- -Private Sub Form_Delete(Cancel As Integer) - On Error GoTo Err_Handler - - If TempVars.item("UserAccessLevel") <> "admin" And _ - TempVars.item("UserAccessLevel") <> "power user" Then - ' Edits not allowed - Cancel = True - GoTo Exit_Procedure - Else - MsgBox "Instead of deleting the task record you may also" & vbCrLf & _ - "set the task status to 'Complete' or 'Inactive'", vbOKOnly, _ - "Reminder - Task status" - End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: Form_BeforeUpdate -' Description: Task list form validation -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: Created John R. Boetsch, September 2008 -' Adapted 06/12/2014 Bonnie Campbell, June 2014 -' Revised 06/12/2014 blc; Last modified 06/12/2014 blc. -' Revisions: Bonnie Campbell, June 12, 2014 - Documentation -' --------------------------------- -Private Sub Form_BeforeUpdate(Cancel As Integer) - On Error GoTo Err_Handler - - ' Validate the record before updating -'FIX -' If IsNull(Me.Request_date) Then -' MsgBox "Please enter the request date for the task", vbOKOnly, "Validation error" -' Me.txtRequest_date.SetFocus -' DoCmd.CancelEvent -' GoTo Exit_Procedure -' ElseIf IsNull(Me.Task_desc) Then -' MsgBox "Please enter a brief task description", vbOKOnly, "Validation error" -' Me.txtTask_desc.SetFocus -' DoCmd.CancelEvent -' GoTo Exit_Procedure -' ElseIf IsNull(Me.Task_status) Then -' MsgBox "Please enter the task status", vbOKOnly, "Validation error" -' Me.cmbTask_status.SetFocus -' DoCmd.CancelEvent -' GoTo Exit_Procedure -' ElseIf Me.Task_status = "Complete" And IsNull(Me.txtDate_completed) Then -' MsgBox "Please enter the completion date", vbOKOnly, "Validation error" -' Me.txtDate_completed.SetFocus -' DoCmd.CancelEvent -' GoTo Exit_Procedure -' ElseIf Me.Task_status <> "Complete" And Not IsNull(Me.txtDate_completed) Then -' MsgBox "Either the task status should be 'Complete' or" & vbCrLf & _ -' "the completion date should be blank.", vbOKOnly, "Validation error" -' Me.cmbTask_status.SetFocus -' DoCmd.CancelEvent -' GoTo Exit_Procedure -' End If - -Exit_Procedure: - Exit Sub - -Err_Handler: - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: Form_DblClick -' Description: Opens Task List popup form -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: Created John R. Boetsch, September 2008 -' Adapted 06/12/2014 Bonnie Campbell, June 2014 -' Revised 06/12/2014 blc; Last modified 06/12/2014 blc. -' Revisions: Bonnie Campbell, June 12, 2014 - Documentation -' --------------------------------- -Private Sub Form_DblClick(Cancel As Integer) - On Error GoTo Err_Handler - -'FIX -' ' Bail out if Location ID is missing ... -' If IsNull(Me.Location_ID) Then GoTo Exit_Procedure -' -' ' Save the record if it is new or there are changes -' If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord -' -' DoCmd.OpenForm "frm_Task_List_Popup", , , "[Location_ID]=""" & Me.Location_ID & _ -' """ AND [Request_date] = #" & Me.Request_date & "# AND [Task_desc] = """ & _ -' Me.txtTask_desc & """", acFormEdit, , ctlPark.Value - - ' This code must come after opening the form as the subform bookmark is lost when requerying - ' Requery the referring form first (to show any recent changes before resetting) - gvarRefForm.Requery - ' Set the global reference variables - Set gvarRefForm = Me.Form - -Exit_Procedure: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case 91 ' Object variable not set - resume next statement - Resume Next - Case 2467 ' Object does not exist - resume next statement - Resume Next - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - End Select - Resume Exit_Procedure - -End Sub - -' --------------------------------- -' SUB: cmdCloseup_Click -' Description: Standard form close -' Parameters: - -' Returns: - -' Throws: - -' References: - -' Source/date: Created John R. Boetsch, September 2008 -' Revised 06/12/2014 blc; Last modified 06/12/2014 blc. -' Revisions: Bonnie Campbell, June 12, 2014 - Documentation -' --------------------------------- -Private Sub cmdCloseup_Click() - On Error GoTo Err_Handler - - ' Save the record if it is new or there are changes - If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord - -'FIX -' If IsNull(Me.Location_ID) Then -' ' If there is no location, launch a new record -' DoCmd.OpenForm "frm_Task_List_Popup", , , , acFormAdd, , ctlPark.Value -' Else: -' DoCmd.OpenForm "frm_Task_List_Popup", , , "[Location_ID]=""" & Me.Location_ID & _ -' """ AND [Request_date] = #" & Me.Request_date & "# AND [Task_desc] = """ & _ -' Me.txtTask_desc & """", acFormEdit, , ctlPark.Value -' End If - - ' This code must come after opening the form as the subform bookmark is lost when requerying - ' Requery the referring form first (to show any recent changes before resetting) - gvarRefForm.Requery - ' Set the global reference variables - Set gvarRefForm = Me.Form - -Exit_Procedure: - Exit Sub - -Err_Handler: - Select Case Err.Number - Case 91 ' Object variable not set - resume next statement - Resume Next - Case 2467 ' Object does not exist - resume next statement - Resume Next - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical - End Select - Resume Exit_Procedure - -End Sub diff --git a/source/queries/Query1.bas b/source/queries/Query1.bas deleted file mode 100644 index cfed5aa..0000000 --- a/source/queries/Query1.bas +++ /dev/null @@ -1,23 +0,0 @@ -dbMemo "SQL" ="PARAMETERS EID Long, SID Long, FID Long, TID Long, MSSID Long, pnum Long, pdist " - "Long, pctfines IEEEDouble, pctwater IEEEDouble, pctlitter IEEEDouble, pctwd IEEE" - "Double, pctsd IEEEDouble, pctfa IEEEDouble, pctmss IEEEDouble, pctwcc IEEEDouble" - ", pcturc IEEEDouble, pctarc IEEEDouble, pd Long, nocanopy Byte, norooted Byte, h" - "astrails Byte, noindsp Byte, cplot Byte, rplot Byte;\015\012INSERT INTO VegPlot " - "( Event_ID, Site_ID, Feature_ID, VegTransect_ID, ModalSedimentSize_ID, PlotNumbe" - "r, PlotDistance_m, PctFines, PctWater, PctLitter, PctWoodyDebris, PctFilamentous" - "Algae, PctStandingDead, PctModalSedimentSize, WoodyCanopyPctCover, UnderstoryRoo" - "tedPctCover, AllRootedPctCover, PlotDensity, NoCanopyVeg, NoRootedVeg, HasSocial" - "Trails, NoIndicatorSpecies, CalibrationPlot, ReplicatePlot )\015\012VALUES ([EID" - "], [SID], [FID], [TID], [MSSID], [pnum], [pdist], [pctfines], [pctwater], [pctli" - "tter], [pctwd], [pctfa], [pctsd], [pctmss], [pctwcc], [pcturc], [pctarc], [pd], " - "[nocanopy], [norooted], [hastrails], [noindsp], [cplot], [rplot]);\015\012" -dbMemo "Connect" ="" -dbBoolean "ReturnsRecords" ="-1" -dbInteger "ODBCTimeout" ="60" -dbBoolean "OrderByOn" ="0" -dbByte "Orientation" ="0" -dbByte "DefaultView" ="2" -dbBoolean "FilterOnLoad" ="0" -dbBoolean "OrderByOnLoad" ="-1" -Begin -End diff --git a/source/queries/usys_temp_qdf.bas b/source/queries/usys_temp_qdf.bas index 3dd81f6..c01405f 100644 --- a/source/queries/usys_temp_qdf.bas +++ b/source/queries/usys_temp_qdf.bas @@ -1,7 +1,8 @@ -dbMemo "SQL" ="PARAMETERS RefTable Text ( 25 ), RefID Long, ID Long, Activity Text ( 2 ), Actio" - "nDate DateTime;\015\012INSERT INTO RecordAction ( ReferenceType, Reference_ID, C" - "ontact_ID, Activity, ActionDate )\015\012VALUES ([RefTable], [RefID], [ID], [Act" - "ivity], [ActionDate]);\015\012" +dbMemo "SQL" ="PARAMETERS pkcode Text ( 4 ), waterway Text ( 25 );\015\012SELECT DISTINCT s.ID," + " s.SiteCode, s.SiteName, s.SiteName + ' (' + s.SiteCode + ')' AS Site\015\012FRO" + "M (Site AS s INNER JOIN Park AS p ON s.Park_ID = p.ID) INNER JOIN River AS r ON " + "r.ID = s.River_ID\015\012WHERE p.ParkCode = [pkcode]\015\012AND r.River = [water" + "way];\015\012" dbMemo "Connect" ="" dbBoolean "ReturnsRecords" ="-1" dbInteger "ODBCTimeout" ="60" diff --git a/source/relations/{3D4797DA-2E71-4099-A138-C67ECA477F31}.txt b/source/relations/{17E58490-47E1-46EB-AA9C-F8AD5F477424}.txt similarity index 65% rename from source/relations/{3D4797DA-2E71-4099-A138-C67ECA477F31}.txt rename to source/relations/{17E58490-47E1-46EB-AA9C-F8AD5F477424}.txt index 577acac..cae13f9 100644 --- a/source/relations/{3D4797DA-2E71-4099-A138-C67ECA477F31}.txt +++ b/source/relations/{17E58490-47E1-46EB-AA9C-F8AD5F477424}.txt @@ -1,5 +1,5 @@ 256 -{3D4797DA-2E71-4099-A138-C67ECA477F31} +{17E58490-47E1-46EB-AA9C-F8AD5F477424} tsys_Link_Files tsys_Link_Tables Field = Begin diff --git a/source/tables/AppEnum.txt b/source/tables/AppEnum.txt index c0a8d40..590d564 100644 --- a/source/tables/AppEnum.txt +++ b/source/tables/AppEnum.txt @@ -1,16 +1,16 @@ ID EnumType Label Summary Sequence -1 PhotoType Feature 1 -2 PhotoType Transect 2 -3 PhotoType Overview 3 -4 PhotoType Reference 4 -5 PhotoType Animals 6 -6 PhotoType Plants 7 -7 PhotoType Cultural 8 -8 PhotoType Scenic 9 -9 PhotoType Disturbance 10 -10 PhotoType Weather 11 -11 PhotoType Fieldwork 12 -12 PhotoType Other 5 +1 PhotoType F Feature 1 +2 PhotoType T Transect 2 +3 PhotoType O Overview 3 +4 PhotoType R Reference 4 +5 PhotoType OA Animals 6 +6 PhotoType OP Plants 7 +7 PhotoType OC Cultural 8 +8 PhotoType OS Scenic 9 +9 PhotoType OD Disturbance 10 +10 PhotoType OW Weather 11 +11 PhotoType OF Fieldwork 12 +12 PhotoType OO Other 5 13 DirectionFacing US 1 14 DirectionFacing DS 2 15 DirectionFacing RR 3 diff --git a/source/tables/tsys_Db_Templates.txt b/source/tables/tsys_Db_Templates.txt index 41792c7..f5e6bf9 100644 --- a/source/tables/tsys_Db_Templates.txt +++ b/source/tables/tsys_Db_Templates.txt @@ -50,10 +50,10 @@ 54 1 1 0 u_contact_isactive_flag SQL u_contact_isactive_flag IsActiveFlag:byte|ID:long PARAMETERS flag BYTE, cid LONG;\nUPDATE Contact\nSET IsActive = [flag]\nWHERE ID = [cid]; Used to update user active flag 6/20/2016 10/24/2016 55 1 1 0 s_contact_username_accesslevel SQL s_contact_username_accesslevel SELECT Username, AccessLevel\nFROM ((contact c\nINNER JOIN Contact_Access ca ON ca.Contact_ID = c.ID)\nINNER JOIN Access a ON a.ID = ca.Access_ID); Used to view username & access level for contacts 6/21/2016 56 1 1 0 s_contact_username_accesslevel_by_ID SQL s_contact_username_accesslevel_by_ID id:long SELECT Username, AccessLevel\nFROM ((contact c\nINNER JOIN Contact_Access ca ON ca.Contact_ID = c.ID)\nINNER JOIN Access a ON a.ID = ca.Access_ID)\nWHERE c.ID = [id]; Used to retrieve specific contact's username & access level 6/21/2016 -59 1 1 0 i_contact_new SQL i_contact FirstName:string|LastName:string|email:string|org:string|MI:string|username:string|WorkPhone:string|WorkExt:string|position:string|IsActive:byte PARAMETERS First TEXT(50), Last TEXT(25), EmailAddress TEXT(50), \nOrg TEXT(50), Login TEXT(75), MI TEXT(4),\nPosition TEXT(50), Phone LONG, Ext INT,\nIsActiveFlag BYTE, IsNPSFlag BYTE; \nINSERT INTO Contact(FirstName, LastName, Email, Organization,\nMiddleInitial, Username, WorkPhone, WorkExtension, PositionTitle, IsActive, IsNPS) \nVALUES\n([First],[Last],\n[EmailAddress],[Org],[MI],[Login],\n[Phone],[Ext],[Position],[IsActiveFlag],[IsNPSFlag]); Used in SaveToDb [cls_Person] 6/7/2016 11/26/2017 1 +59 1 1 0 i_contact_new SQL i_contact PARAMETERS First TEXT(50), Last TEXT(25), EmailAddress TEXT(50), \nOrg TEXT(50), Login TEXT(75), MI TEXT(4),\nPosition TEXT(50), Phone SINGLE, Ext INT,\nIsActiveFlag BYTE, IsNPSFlag BYTE; \nINSERT INTO Contact(FirstName, LastName, Email, Organization,\nMiddleInitial, Username, WorkPhone, WorkExtension, PositionTitle, IsActive, IsNPS) \nVALUES\n([First],[Last],\n[EmailAddress],[Org],[MI],[Login],\n[Phone],[Ext],[Position],[IsActiveFlag],[IsNPSFlag]); Used in SaveToDb [cls_Person] 6/7/2016 12/14/2017 1 60 1 1 0 s_contact_access SQL s_contact_access SELECT *\nFROM ((Contact c\nLEFT JOIN Contact_Access ca ON ca.Contact_ID = c.ID)\nLEFT JOIN Access a ON a.ID = ca.Access_ID) \n; Used as datasource for Contact form 6/23/2016 10/17/2016 61 1 1 0 s_access SQL s_access SELECT * FROM Access; Used as datasource for Contact form user access dropdown 6/23/2016 -62 1 1 0 u_contact SQL u_contact PARAMETERS First TEXT(50), Last TEXT(25), \nEmailAddress TEXT(50), \nOrg TEXT(50), MI TEXT(4), Login TEXT(75), \nPhone LONG, Ext INT,Position TEXT(50), \nIsActiveFlag BYTE, IsNPSFlag BYTE, ContactID LONG; \nUPDATE Contact\nSET\nFirstName = [First], \nLastName = [Last], \nEmail = [EmailAddress], \nOrganization = [Org],\nMiddleInitial = [MI], \nUsername = [Login], \nWorkPhone = [Phone], \nWorkExtension = [Ext], \nPositionTitle = [Position], \nIsActive = [IsActiveFlag], \nIsNPS = [IsNPSFlag]\nWHERE ID = [ContactID]; Used to update contact info from Contact form 6/23/2016 11/26/2017 1 +62 1 1 0 u_contact SQL u_contact PARAMETERS First TEXT(50), Last TEXT(25), \nEmailAddress TEXT(50), \nOrg TEXT(50), MI TEXT(4), Login TEXT(75), \nPhone SINGLE, Ext INT,Position TEXT(50), \nIsActiveFlag BYTE, IsNPSFlag BYTE, ContactID LONG; \nUPDATE Contact\nSET\nFirstName = [First], \nLastName = [Last], \nEmail = [EmailAddress], \nOrganization = [Org],\nMiddleInitial = [MI], \nUsername = [Login], \nWorkPhone = [Phone], \nWorkExtension = [Ext], \nPositionTitle = [Position], \nIsActive = [IsActiveFlag], \nIsNPS = [IsNPSFlag]\nWHERE ID = [ContactID]; Used to update contact info from Contact form 6/23/2016 6/23/2017 12/14/2017 1 63 1 1 0 u_contact_access SQL u_contact_access PARAMETERS ContactID LONG, AccessID LONG; \nUPDATE Contact_Access\nSET\nAccess_ID = [AccessID]\nWHERE Contact_ID = [ContactID]; Used to update contact's access level from Contact form 6/23/2016 8/29/2016 64 1 1 0 s_count_tbl SQL s_count_tbl field:string|tbl:string SELECT COUNT([field]) FROM [tbl]; Used for any counts lookup 6/26/2016 65 1 1 0 s_location_by_park SQL s_location_by_park parkcode:string SELECT * FROM location 6/27/2016 @@ -179,3 +179,4 @@ 247 1 1 0 i_unknown SQL i_unknown PARAMETERS \nucode TEXT(15), ptype TEXT(15), pdescr TEXT(255),\nsfeat TEXT(255), ltype TEXT(50), lmarg TEXT(50), \nlch TEXT(255),sch TEXT(255), fch TEXT(255), gch TEXT(255), \nforb TEXT(10), pere TEXT(15), bguess TEXT(50),\npix BYTE, coll BYTE, collmeth TEXT(50),\nlid LONG, cid LONG;\nINSERT INTO UnknownSpecies (\nUnknownCode, PlantType,PlantDescription,SalientFeature,\nLeafType,LeafMargin, LeafCharacter,\n StemCharacter, FlowerCharacter,GeneralCharacter,\nForbGrassType, PerennialGrassType,BestGuess,\nHasPhotos,Collected, CollectionMethod, \nLocation_ID, CollectedBy_ID\n)\nVALUES\n([ucode],[ptype],[pdescr],[sfeat],\n[ltype],[lmarg],[lch],[sch],[fch],[gch],\n[forb],[pere],[bguess],[pix],[coll],[collmeth],\n[lid],[cid]); Adds unknown species via Unknown form 11/12/2017 11/12/2916 11/12/2017 248 1 1 0 u_unknown SQL u_unknown PARAMETERS \nuid LONG, ucode TEXT(15), ptype TEXT(15), pdescr TEXT(255),\nsfeat TEXT(255), ltype TEXT(50), lmarg TEXT(50), \nlch TEXT(255),sch TEXT(255), fch TEXT(255), gch TEXT(255), \nforb TEXT(10), pere TEXT(15), bguess TEXT(50),\npix BYTE, coll BYTE, collmeth TEXT(50),\nlid LONG, cid LONG;\nUPDATE UnknownSpecies \nSET\nUnknownCode = [ucode], PlantType = [ptype],\nPlantDescription = [pdescr],SalientFeature = [sfeat],\nLeafType = [ltype],LeafMargin = [lmarg], LeafCharacter = [lch],\n StemCharacter = [sch], FlowerCharacter = [fch],GeneralCharacter = [gch],\nForbGrassType = [forb], PerennialGrassType = [pere],BestGuess = [bguess],\nHasPhotos = [pix],Collected = [coll], CollectionMethod = [collmeth], \nLocation_ID = [lid], CollectedBy_ID = [cid]\nWHERE\nID = [uid]; Updates unknown species via Unknown form 11/12/2017 11/12/2017 11/12/2017 249 1 1 0 u_unknown_identify SQL u_unknown_identify PARAMETERS uid LONG, cid LONG, \nccode TEXT(50), \nidate DATE;\nUPDATE UnknownSpecies\nSET\nConfirmedCode = [ccode],\nIdentifiedBy_ID = [cid],\nIdentifiedDate = [idate]\nWHERE\nID = [uid]; Identify unknown species via ConfirmUnknown form 11/12/2017 11/12/2017 11/12/2017 +250 1 1 0 s_usys_temp_photo_list SQL s_usys_temp_photo_list \tSELECT \nID, PhotoType, PhotoPath, PhotoFilename, PhotoDate, \tEvent_ID, Photographer_ID\nFROM usys_temp_photo\nORDER BY\nPhotoType, Event_ID; Displays photos for batch photo update form 12/11/2017 12/11/2017 12/11/2017 diff --git a/source/tbldef/SOP_VersionTable copy.sql b/source/tbldef/SOP_VersionTable copy.sql new file mode 100644 index 0000000..ade0710 --- /dev/null +++ b/source/tbldef/SOP_VersionTable copy.sql @@ -0,0 +1,34 @@ +CREATE TABLE [SOP_VersionTable copy] ( + [EffectiveDate] DATETIME , + [100-Rapid assessment] DOUBLE , + [101-BLCA field methods] DOUBLE , + [102-DINO field methods] DOUBLE , + [103-CANY field methods] DOUBLE , + [104-DINO measuring vegetation] DOUBLE , + [105-DINO facies mapping & grain size dist_] DOUBLE , + [106-CANY & DINO equip_ lists] DOUBLE , + [107-CANY field methods] DOUBLE , + [10-After each field season] DOUBLE , + [11-Data management] DOUBLE , + [12-Data analysis & reporting] DOUBLE , + [13-Revising the protocol] DOUBLE , + [14-BLCA field methods, DINO sentinel site set up] DOUBLE , + [14-Facies mapping] DOUBLE , + [15-CURE methods] DOUBLE , + [16-Total station surveying] DOUBLE , + [17-RTK surveying part 1] DOUBLE , + [18-RTK surveying part 2] DOUBLE , + [19-Remote sensing] DOUBLE , + [1-Prior to field season/equip_ lists] DOUBLE , + [20-CURE field methods] DOUBLE , + [2-Training observers] DOUBLE , + [3-GPS methods] DOUBLE , + [4-Sentinel site set up] DOUBLE , + [5-Photos] DOUBLE , + [6-Measuring vegetation] DOUBLE , + [6-Vegetation] DOUBLE , + [7-Hydrologic measurements] DOUBLE , + [8-Facies mapping & grain size dist_] DOUBLE , + [8-Surveying] DOUBLE , + [9-After each field visit] DOUBLE +) diff --git a/source/tbldef/SOP_Version_20171208_154148.sql b/source/tbldef/SOP_Version_20171208_154148.sql new file mode 100644 index 0000000..dee0474 --- /dev/null +++ b/source/tbldef/SOP_Version_20171208_154148.sql @@ -0,0 +1,36 @@ +CREATE TABLE [SOP_Version_20171208_154148] ( + [EffectiveDate] DOUBLE , + ['100-Rapid assessment'] CURRENCY , + ['101-BLCA field methods'] CURRENCY , + ['102-DINO field methods'] CURRENCY , + ['103-CANY field methods'] CURRENCY , + ['104-DINO measuring vegetation'] CURRENCY , + ['105-DINO facies mapping & grain size dist_'] CURRENCY , + ['106-CANY & DINO equip_ lists'] CURRENCY , + ['107-CANY field methods'] CURRENCY , + ['10-After each field season'] CURRENCY , + ['11-Data management'] CURRENCY , + ['12-Data analysis & reporting'] CURRENCY , + ['13-Revising the protocol'] CURRENCY , + ['14-BLCA field methods'] CURRENCY , + ['DINO sentinel site set up'] CURRENCY , + ['14-Facies mapping'] CURRENCY , + ['15-CURE methods'] CURRENCY , + ['16-Total station surveying'] CURRENCY , + ['17-RTK surveying part 1'] CURRENCY , + ['18-RTK surveying part 2'] CURRENCY , + ['19-Remote sensing'] CURRENCY , + ['1-Prior to field season/equip_ lists'] CURRENCY , + ['20-CURE field methods'] CURRENCY , + ['2-Training observers'] CURRENCY , + ['3-GPS methods'] CURRENCY , + ['4-Sentinel site set up'] CURRENCY , + ['5-Photos'] CURRENCY , + ['6-Measuring vegetation'] CURRENCY , + ['6-Vegetation'] CURRENCY , + ['7-Hydrologic measurements'] CURRENCY , + ['8-Facies mapping & grain size dist_'] CURRENCY , + ['8-Surveying'] CURRENCY , + ['9-After each field visit'] CURRENCY , + [''] CURRENCY +) diff --git a/source/tbldef/SOP_Version_20171208_155317.sql b/source/tbldef/SOP_Version_20171208_155317.sql new file mode 100644 index 0000000..94a647e --- /dev/null +++ b/source/tbldef/SOP_Version_20171208_155317.sql @@ -0,0 +1,35 @@ +CREATE TABLE [SOP_Version_20171208_155317] ( + [EffectiveDate] DOUBLE , + ['100-Rapid assessment'] DOUBLE , + ['101-BLCA field methods'] DOUBLE , + ['102-DINO field methods'] DOUBLE , + ['103-CANY field methods'] DOUBLE , + ['104-DINO measuring vegetation'] DOUBLE , + ['105-DINO facies mapping & grain size dist_'] DOUBLE , + ['106-CANY & DINO equip_ lists'] DOUBLE , + ['107-CANY field methods'] DOUBLE , + ['10-After each field season'] DOUBLE , + ['11-Data management'] DOUBLE , + ['12-Data analysis & reporting'] DOUBLE , + ['13-Revising the protocol'] DOUBLE , + ['14-BLCA field methods'] DOUBLE , + ['DINO sentinel site set up'] DOUBLE , + ['14-Facies mapping'] DOUBLE , + ['15-CURE methods'] DOUBLE , + ['16-Total station surveying'] DOUBLE , + ['17-RTK surveying part 1'] DOUBLE , + ['18-RTK surveying part 2'] DOUBLE , + ['19-Remote sensing'] DOUBLE , + ['1-Prior to field season/equip_ lists'] DOUBLE , + ['20-CURE field methods'] DOUBLE , + ['2-Training observers'] DOUBLE , + ['3-GPS methods'] DOUBLE , + ['4-Sentinel site set up'] DOUBLE , + ['5-Photos'] DOUBLE , + ['6-Measuring vegetation'] DOUBLE , + ['6-Vegetation'] DOUBLE , + ['7-Hydrologic measurements'] DOUBLE , + ['8-Facies mapping & grain size dist_'] DOUBLE , + ['8-Surveying'] DOUBLE , + ['9-After each field visit'] DOUBLE +) diff --git a/source/tbldef/SOP_Version_20171208_162624.sql b/source/tbldef/SOP_Version_20171208_162624.sql new file mode 100644 index 0000000..14a3ba3 --- /dev/null +++ b/source/tbldef/SOP_Version_20171208_162624.sql @@ -0,0 +1,35 @@ +CREATE TABLE [SOP_Version_20171208_162624] ( + [EffectiveDate] DATETIME , + [100-Rapid assessment] DOUBLE , + [101-BLCA field methods] DOUBLE , + [102-DINO field methods] DOUBLE , + [103-CANY field methods] DOUBLE , + [104-DINO measuring vegetation] DOUBLE , + [105-DINO facies mapping & grain size dist_] DOUBLE , + [106-CANY & DINO equip_ lists] DOUBLE , + [107-CANY field methods] DOUBLE , + [10-After each field season] DOUBLE , + [11-Data management] DOUBLE , + [12-Data analysis & reporting] DOUBLE , + [13-Revising the protocol] DOUBLE , + [14-BLCA field methods] DOUBLE , + [DINO sentinel site set up] DOUBLE , + [14-Facies mapping] DOUBLE , + [15-CURE methods] DOUBLE , + [16-Total station surveying] DOUBLE , + [17-RTK surveying part 1] DOUBLE , + [18-RTK surveying part 2] DOUBLE , + [19-Remote sensing] DOUBLE , + [1-Prior to field season/equip_ lists] DOUBLE , + [20-CURE field methods] DOUBLE , + [2-Training observers] DOUBLE , + [3-GPS methods] DOUBLE , + [4-Sentinel site set up] DOUBLE , + [5-Photos] DOUBLE , + [6-Measuring vegetation] DOUBLE , + [6-Vegetation] DOUBLE , + [7-Hydrologic measurements] DOUBLE , + [8-Facies mapping & grain size dist_] DOUBLE , + [8-Surveying] DOUBLE , + [9-After each field visit] DOUBLE +) diff --git a/source/tbldef/SOP_Version_20171208_162825.sql b/source/tbldef/SOP_Version_20171208_162825.sql new file mode 100644 index 0000000..58a6c9d --- /dev/null +++ b/source/tbldef/SOP_Version_20171208_162825.sql @@ -0,0 +1,35 @@ +CREATE TABLE [SOP_Version_20171208_162825] ( + [EffectiveDate] DATETIME , + [100-Rapid assessment] DOUBLE , + [101-BLCA field methods] DOUBLE , + [102-DINO field methods] DOUBLE , + [103-CANY field methods] DOUBLE , + [104-DINO measuring vegetation] DOUBLE , + [105-DINO facies mapping & grain size dist_] DOUBLE , + [106-CANY & DINO equip_ lists] DOUBLE , + [107-CANY field methods] DOUBLE , + [10-After each field season] DOUBLE , + [11-Data management] DOUBLE , + [12-Data analysis & reporting] DOUBLE , + [13-Revising the protocol] DOUBLE , + [14-BLCA field methods] DOUBLE , + [DINO sentinel site set up] DOUBLE , + [14-Facies mapping] DOUBLE , + [15-CURE methods] DOUBLE , + [16-Total station surveying] DOUBLE , + [17-RTK surveying part 1] DOUBLE , + [18-RTK surveying part 2] DOUBLE , + [19-Remote sensing] DOUBLE , + [1-Prior to field season/equip_ lists] DOUBLE , + [20-CURE field methods] DOUBLE , + [2-Training observers] DOUBLE , + [3-GPS methods] DOUBLE , + [4-Sentinel site set up] DOUBLE , + [5-Photos] DOUBLE , + [6-Measuring vegetation] DOUBLE , + [6-Vegetation] DOUBLE , + [7-Hydrologic measurements] DOUBLE , + [8-Facies mapping & grain size dist_] DOUBLE , + [8-Surveying] DOUBLE , + [9-After each field visit] DOUBLE +)