diff --git a/big_rivers.zip b/big_rivers.zip new file mode 100644 index 0000000..ab794c3 Binary files /dev/null and b/big_rivers.zip differ diff --git a/big_rivers_new.zip b/big_rivers_new.zip deleted file mode 100644 index b5b9923..0000000 Binary files a/big_rivers_new.zip and /dev/null differ diff --git a/source/forms/Comment.bas b/source/forms/Comment.bas index 9dee143..376926d 100644 --- a/source/forms/Comment.bas +++ b/source/forms/Comment.bas @@ -1065,7 +1065,7 @@ On Error GoTo Err_Handler Me.Title = "Comment" Me.lineIndicator.Width = Me.Form.Width - Me.lineIndicator.borderColor = lngLime + Me.lineIndicator.BorderColor = lngLime 'defaults Dim instruction As String diff --git a/source/forms/CommentList.bas b/source/forms/CommentList.bas index 5025b6d..0b2c6b2 100644 --- a/source/forms/CommentList.bas +++ b/source/forms/CommentList.bas @@ -19,12 +19,12 @@ Begin Form Width =9060 DatasheetFontHeight =11 ItemSuffix =43 - Left =3525 - Top =6630 - Right =12945 - Bottom =10995 + Left =4230 + Top =7005 + Right =13650 + Bottom =11370 DatasheetGridlinesColor =14806254 - Filter ="CommentType='event' AND CommentType_ID=39" + Filter ="CommentType='event' AND CommentType_ID=38" RecSrcDt = Begin 0x0a6c31995402e540 End @@ -693,7 +693,7 @@ Option Explicit ' ================================= ' Form: CommentList ' Level: Application form -' Version: 1.00 +' Version: 1.01 ' Basis: Dropdown form ' ' Description: List form object related properties, events, functions & procedures for UI display @@ -701,6 +701,7 @@ Option Explicit ' Source/date: Bonnie Campbell, October 18, 2017 ' References: - ' Revisions: BLC - 10/18/2017 - 1.00 - initial version +' BLC - 11/24/2017 - 1.01 - fixed to delete from AppComment vs tsys_Db_Templates ' ================================= '--------------------- @@ -1014,6 +1015,7 @@ End Sub ' Revisions: ' BLC - 6/1/2016 - initial version ' BLC - 10/16/2017 - revised to use tbxID vs. ID on delete +' BLC - 11/24/2017 - fixed to delete from AppComment vs tsys_Db_Templates ' --------------------------------- Private Sub btnDelete_Click() On Error GoTo Err_Handler @@ -1024,7 +1026,7 @@ On Error GoTo Err_Handler result = MsgBox("Delete Record this record: #" & tbxID & " ?" _ & vbCrLf & "This action cannot be undone.", vbYesNo, "Delete Record?") - If result = vbYes Then DeleteRecord "tsys_Db_Templates", tbxID + If result = vbYes Then DeleteRecord "AppComment", tbxID 'clear the deleted record Me.Requery diff --git a/source/forms/ConnectDbs.bas b/source/forms/ConnectDbs.bas index 0b48e9f..30fd126 100644 --- a/source/forms/ConnectDbs.bas +++ b/source/forms/ConnectDbs.bas @@ -22,10 +22,10 @@ Begin Form Width =10800 DatasheetFontHeight =10 ItemSuffix =111 - Left =3855 - Top =2430 - Right =23490 - Bottom =15015 + Left =4065 + Top =3105 + Right =16815 + Bottom =14490 DatasheetGridlinesColor =12632256 RecSrcDt = Begin 0xfe27f5b1c5c3e440 @@ -1624,12 +1624,13 @@ Private Sub btnUpdateLinks_Click() End With ' update tsys_Link_Dbs & tsys_Link_Files database name & paths - DoCmd.SetWarnings False 'hide the append dialog +' DoCmd.SetWarnings False 'hide the append dialog ' strSQL = "UPDATE tsys_Link_Files SET Link_File_Path = '" & strNewPath & "', " & _ ' "Link_file_name = '" & strNewDb & "' " & _ ' "WHERE Link_file_name = '" & strDbName & "';" strSQL = GetTemplate("u_tsys_Link_Files_new_db", "NewPath" & PARAM_SEPARATOR & strNewPath & "|NewDb" & PARAM_SEPARATOR & strNewDb & "|DbName" & PARAM_SEPARATOR & strNewDb) +Debug.Print strSQL DoCmd.RunSQL strSQL DoCmd.SetWarnings True diff --git a/source/forms/Events.bas b/source/forms/Events.bas index 810c750..105f52e 100644 --- a/source/forms/Events.bas +++ b/source/forms/Events.bas @@ -20,10 +20,10 @@ Begin Form Width =7860 DatasheetFontHeight =11 ItemSuffix =35 - Left =3855 - Top =3150 - Right =12765 - Bottom =14535 + Left =4065 + Top =3105 + Right =16815 + Bottom =14490 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x656d3fc92f05e540 @@ -810,8 +810,8 @@ Option Explicit ' ================================= ' Form: Events ' Level: Application form -' Version: 1.14 -' Basis: Dropdown form +' Version: 1.15 +' Basis: Dropdown frm ' ' Description: Events form object related properties, events, functions & procedures for UI display ' @@ -836,6 +836,7 @@ Option Explicit ' BLC - 10/24/2017 - 1.12 - comment out unused cbxSite ' BLC - 11/6/2017 - 1.13 - set so Save button only enabled for new events (tbxID = 0) ' BLC - 11/10/2017 - 1.14 - added Form_GotFocus for updating cbxLocation after new location added +' BLC - 11/24/2017 - 1.15 - revised comment button caption ' ================================= '--------------------- @@ -926,6 +927,7 @@ End Property ' BLC - 1/13/2017 - revised to use && vs. StringFromCodepoint(uAmpersand) for directions ' BLC - 10/16/2017 - added date hint, uncommented ClearForm() ' BLC - 10/24/2017 - commented out unused cbxSite +' BLC - 11/24/2017 - revised comment button caption ' --------------------------------- Private Sub Form_Open(Cancel As Integer) On Error GoTo Err_Handler @@ -947,6 +949,9 @@ On Error GoTo Err_Handler Directions = "Choose the site location, then enter the sampling start date." tbxIcon.Value = StringFromCodepoint(uBullet) lblDirections.ForeColor = lngLtBlue + btnComment.Caption = StringFromCodepoint(uComment) + btnComment.ForeColor = lngBlue + 'set hint Me.lblHintDate.Caption = "M\DD\YYYY" diff --git a/source/forms/EventsList.bas b/source/forms/EventsList.bas index 99b96a5..518ff68 100644 --- a/source/forms/EventsList.bas +++ b/source/forms/EventsList.bas @@ -20,20 +20,14 @@ Begin Form Width =7560 DatasheetFontHeight =11 ItemSuffix =30 - Left =285 - Top =2985 - Right =7920 - Bottom =7350 + Left =450 + Top =3450 + Right =7830 + Bottom =7560 DatasheetGridlinesColor =14806254 RecSrcDt = Begin - 0xc002d3eb7005e540 + 0x78280a14fe06e540 End - RecordSource ="PARAMETERS pkcode Text ( 255 ), waterway Text ( 255 ); SELECT e.ID, s.SiteCode, " - "e.Site_ID, s.SiteName, loc.LocationName, e.Location_ID, e.StartDate FROM (((Even" - "t AS e INNER JOIN Site AS s ON s.ID = e.Site_ID) INNER JOIN Location AS loc ON l" - "oc.ID = e.Location_ID) INNER JOIN Park AS p ON p.ID = s.Park_ID) INNER JOIN Rive" - "r AS r ON r.ID = s.River_ID WHERE p.ParkCode = [pkcode] AND r.Segment = [waterwa" - "y] ORDER BY e.StartDate DESC , s.SiteName, loc.LocationName; " Caption ="_List" OnCurrent ="[Event Procedure]" OnOpen ="[Event Procedure]" diff --git a/source/forms/Feature.bas b/source/forms/Feature.bas index 1cb11d0..ddd91ea 100644 --- a/source/forms/Feature.bas +++ b/source/forms/Feature.bas @@ -19,17 +19,19 @@ Begin Form GridY =24 Width =7860 DatasheetFontHeight =11 - ItemSuffix =34 - Left =2820 - Top =2430 - Right =25035 - Bottom =15015 + ItemSuffix =35 + Left =4065 + Top =3105 + Right =13005 + Bottom =14490 DatasheetGridlinesColor =14806254 RecSrcDt = Begin - 0x236ab60a61c3e440 + 0x82eca7fa0007e540 End - Caption ="Events (Sampling Visits)" + Caption ="Feature" OnCurrent ="[Event Procedure]" + BeforeUpdate ="[Event Procedure]" + AfterUpdate ="[Event Procedure]" OnOpen ="[Event Procedure]" OnClose ="[Event Procedure]" DatasheetFontName ="Calibri" @@ -164,7 +166,7 @@ Begin Form BorderColor =8355711 ForeColor =16777215 Name ="lblTitle" - Caption ="Features" + Caption ="Feature" GridlineColor =10921638 LayoutCachedLeft =180 LayoutCachedTop =60 @@ -182,7 +184,7 @@ Begin Form BorderColor =8355711 ForeColor =16777164 Name ="lblDirections" - Caption ="directions" + Caption ="Enter feature details." GridlineColor =10921638 LayoutCachedLeft =180 LayoutCachedTop =420 @@ -216,9 +218,9 @@ Begin Form Top =900 Width =720 TabIndex =2 - ForeColor =4210752 + ForeColor =16711680 Name ="btnComment" - Caption ="comment" + Caption ="" OnClick ="[Event Procedure]" GridlineColor =10921638 @@ -226,9 +228,11 @@ Begin Form LayoutCachedTop =900 LayoutCachedWidth =7380 LayoutCachedHeight =1260 + ForeThemeColorIndex =-1 BackColor =14136213 BorderColor =14136213 - HoverColor =15060409 + HoverColor =65280 + HoverThemeColorIndex =-1 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 @@ -246,9 +250,9 @@ Begin Form Height =315 FontWeight =600 BorderColor =8355711 - ForeColor =16777215 + ForeColor =6750105 Name ="lblContext" - Caption ="Context" + Caption ="context" GridlineColor =10921638 LayoutCachedLeft =3660 LayoutCachedTop =60 @@ -280,7 +284,7 @@ Begin Form LimitToList = NotDefault OverlapFlags =85 IMESentenceMode =3 - ColumnCount =5 + ColumnCount =2 Left =1200 Top =900 Width =3414 @@ -298,7 +302,7 @@ Begin Form End Name ="cbxLocation" RowSourceType ="Table/Query" - ColumnWidths ="0;0;0;0;1" + ColumnWidths ="0;1440" AfterUpdate ="[Event Procedure]" ControlTipText ="Transect location" GridlineColor =10921638 @@ -399,6 +403,7 @@ Begin Form BackThemeColorIndex =1 Begin Begin CommandButton + Enabled = NotDefault OverlapFlags =85 Left =6660 Top =60 @@ -453,7 +458,8 @@ Begin Form LayoutCachedHeight =420 BackColor =14136213 BorderColor =14136213 - HoverColor =15060409 + HoverColor =65280 + HoverThemeColorIndex =-1 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 @@ -474,6 +480,7 @@ Begin Form BorderColor =10921638 ForeColor =4210752 Name ="tbxFeature" + ControlSource ="Feature" AfterUpdate ="[Event Procedure]" ConditionalFormat = Begin 0x010000009a000000020000000100000000000000000000001600000001000000 , @@ -579,7 +586,8 @@ Begin Form LayoutCachedHeight =420 BackColor =14136213 BorderColor =14136213 - HoverColor =15060409 + HoverColor =65280 + HoverThemeColorIndex =-1 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 @@ -591,7 +599,7 @@ Begin Form End Begin Subform CanShrink = NotDefault - OverlapFlags =215 + OverlapFlags =247 Left =105 Top =4740 Width =7650 @@ -639,6 +647,8 @@ Begin Form BorderColor =8355711 ForeColor =8355711 Name ="tbxID" + ControlSource ="ID" + DefaultValue ="0" GridlineColor =10921638 LayoutCachedLeft =7560 @@ -651,13 +661,13 @@ Begin Form ForeTint =50.0 End Begin TextBox - OverlapFlags =85 + OverlapFlags =93 IMESentenceMode =3 Left =420 Top =2820 Width =7140 Height =1500 - TabIndex =1 + TabIndex =2 BorderColor =10921638 ForeColor =4210752 Name ="tbxDescription" @@ -695,7 +705,7 @@ Begin Form Top =990 Width =7140 Height =1320 - TabIndex =2 + TabIndex =1 BorderColor =10921638 ForeColor =4210752 Name ="tbxFeatureDirections" @@ -738,9 +748,9 @@ Begin Form RightMargin =360 BackColor =4144959 BorderColor =8355711 - ForeColor =16777164 + ForeColor =65535 Name ="lblMsg" - Caption ="message" + Caption ="msg" GridlineColor =10921638 LayoutCachedTop =4380 LayoutCachedWidth =7860 @@ -750,23 +760,43 @@ Begin Form ForeTint =100.0 End Begin Label - BackStyle =1 - OverlapFlags =215 + OverlapFlags =85 + Left =3300 + Top =180 + Width =1620 + Height =420 + FontSize =8 + BorderColor =8355711 + ForeColor =16711680 + Name ="lblHintFeature" + Caption ="1 or 2-letters \015\012(e.g. A, B, EF, R)" + GridlineColor =10921638 + LayoutCachedLeft =3300 + LayoutCachedTop =180 + LayoutCachedWidth =4920 + LayoutCachedHeight =600 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin Label + OverlapFlags =255 TextAlign =2 - Top =4380 - Width =660 - Height =315 - TopMargin =7 + Left =3720 + Top =4140 + Width =825 + Height =600 + FontSize =20 BackColor =4144959 BorderColor =8355711 - ForeColor =16777164 + ForeColor =16772541 Name ="lblMsgIcon" Caption ="icon" FontName ="Segoe UI" GridlineColor =10921638 - LayoutCachedTop =4380 - LayoutCachedWidth =660 - LayoutCachedHeight =4695 + LayoutCachedLeft =3720 + LayoutCachedTop =4140 + LayoutCachedWidth =4545 + LayoutCachedHeight =4740 ThemeFontIndex =-1 BackThemeColorIndex =-1 ForeThemeColorIndex =-1 @@ -794,7 +824,7 @@ Option Explicit ' ================================= ' Form: Feature ' Level: Application form -' Version: 1.05 +' Version: 1.06 ' Basis: Dropdown form ' ' Description: Feature form object related properties, Feature, functions & procedures for UI display @@ -810,6 +840,8 @@ Option Explicit ' to populate location, code cleanup ' BLC - 1/11/2017 - 1.04 - added location button/combobox ' BLC - 10/17/2017 - 1.05 - fixed comment arguments from Event/Transect to Feature +' BLC - 11/24/2017 - 1.06 - fixed Save & Comment button states, +' added tbxFeatureDirections, tbxDescription after update events ' ================================= '--------------------- @@ -823,6 +855,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 '--------------------- @@ -912,6 +946,7 @@ On Error GoTo Err_Handler tbxIcon.Value = StringFromCodepoint(uBullet) lblDirections.ForeColor = lngLtBlue lblDirections.Caption = "Enter feature details." + lblHintFeature.Caption = "1 or 2-letters " & vbCrLf & "(e.g. A, B, EF, R)" btnComment.Caption = StringFromCodepoint(uComment) btnComment.ForeColor = lngBlue @@ -925,6 +960,7 @@ On Error GoTo Err_Handler btnComment.Enabled = False btnSave.Enabled = False tbxFeature.BackColor = lngYellow + 'tbxFeature.ValidationRule = "LIKE [A-Z][A-Z]" lblMsgIcon.Caption = "" lblMsg.Caption = "" @@ -1005,7 +1041,7 @@ End Sub Private Sub Form_Current() On Error GoTo Err_Handler - If tbxID > 0 Then btnComment.Enabled = True + 'If tbxID > 0 Then btnComment.Enabled = True Exit_Handler: Exit Sub @@ -1018,6 +1054,69 @@ Err_Handler: Resume Exit_Handler End Sub +' --------------------------------- +' Sub: Form_BeforeUpdate +' Description: form current actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, November 24, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/24/2017 - initial version +' --------------------------------- +Private Sub Form_BeforeUpdate(Cancel As Integer) +On Error GoTo Err_Handler + + If Not m_SaveOK Then + Cancel = True + End If + 'Cancel = True + + Me.lblMsg.Caption = StringFromCodepoint(uRArrow) & " Updating record..." + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - Form_BeforeUpdate[Feature form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: Form_AfterUpdate +' Description: form after update actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, November 24, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/24/2017 - initial version +' --------------------------------- +Private Sub Form_AfterUpdate() +On Error GoTo Err_Handler + + Me.lblMsg.Caption = "" + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - Form_BeforeUpdate[Feature form])" + End Select + Resume Exit_Handler +End Sub + ' --------------------------------- ' Sub: tbxFeature_AfterUpdate ' Description: Textbox after update actions @@ -1048,6 +1147,66 @@ Err_Handler: Resume Exit_Handler End Sub +' --------------------------------- +' Sub: tbxFeatureDirections_AfterUpdate +' Description: Textbox after update actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, November 24, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/24/2016 - initial version +' --------------------------------- +Private Sub tbxFeatureDirections_AfterUpdate() +On Error GoTo Err_Handler + + If Len(tbxFeatureDirections.Text) > 0 Then _ + ReadyForSave + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - tbxFeatureDirections_Change[Feature form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: tbxDescription_AfterUpdate +' Description: Textbox after update actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, November 24, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/24/2016 - initial version +' --------------------------------- +Private Sub tbxDescription_AfterUpdate() +On Error GoTo Err_Handler + + If Len(tbxDescription.Text) > 0 Then _ + ReadyForSave + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - tbxDescription_Change[Feature form])" + End Select + Resume Exit_Handler +End Sub + ' --------------------------------- ' Sub: cbxLocation_AfterUpdate ' Description: AfterUpdate actions @@ -1123,8 +1282,22 @@ End Sub Private Sub btnSave_Click() On Error GoTo Err_Handler + 'set enable btnSave_Click save + m_SaveOK = True + UpsertRecord Me + Me![list].Form.Requery + + 'revert to disable non-btnSave_Click save + m_SaveOK = False + + 'clear fields + ClearForm Me + + cbxLocation.ControlSource = "" 'clear from Location_ID + cbxLocation.Value = "" + Exit_Handler: Exit Sub Err_Handler: @@ -1153,7 +1326,7 @@ End Sub Private Sub btnAddLocation_Click() On Error GoTo Err_Handler - 'open comment form + 'open location form DoCmd.OpenForm "Location", acNormal, , , , , "Feature|" & tbxID Exit_Handler: @@ -1242,6 +1415,8 @@ End Sub ' Revisions: ' BLC - 6/27/2016 - initial version ' BLC - 8/23/2016 - changed ReadyForSave() to public for mod_App_Data Upsert/SetRecord() +' BLC - 11/24/2017 - updated so Save button only available when tbxID = 0 (new feature), +' Comment button only available when tbxID > 0 (existing feature) ' --------------------------------- Public Sub ReadyForSave() On Error GoTo Err_Handler @@ -1255,13 +1430,24 @@ On Error GoTo Err_Handler 'requires: feature & location ID If Len(Nz(tbxFeature.Value, "")) > 0 Then isOK = True + + lblMsg.ForeColor = lngYellow + lblMsgIcon.ForeColor = lngYellow + lblMsgIcon.Caption = StringFromCodepoint(uDoubleTriangleBlkR) + lblMsg.Caption = "Tab to enter feature changes..." End If tbxIcon.ForeColor = IIf(isOK = True, lngDkGreen, lngRed) - btnSave.Enabled = isOK + + 'enable save button only for new events (tbxID = 0) + If tbxID = 0 Then btnSave.Enabled = isOK 'refresh form - Me.Requery + 'Me.Requery + + 'enable comment if ID > 0 + If tbxID > 0 Then btnComment.Enabled = True + Exit_Handler: Exit Sub Err_Handler: diff --git a/source/forms/FeatureList.bas b/source/forms/FeatureList.bas index 9a82b3f..eadc4d0 100644 --- a/source/forms/FeatureList.bas +++ b/source/forms/FeatureList.bas @@ -20,15 +20,14 @@ Begin Form Width =7560 DatasheetFontHeight =11 ItemSuffix =28 - Left =1815 - Top =4710 - Right =9450 - Bottom =9075 + Left =450 + Top =7320 + Right =7830 + Bottom =11430 DatasheetGridlinesColor =14806254 RecSrcDt = Begin - 0x388afb2190c6e440 + 0x07cbc4f50007e540 End - RecordSource ="SELECT * FROM Feature AS f INNER JOIN Location AS l ON l.ID = f.Location_ID; " Caption ="_List" OnCurrent ="[Event Procedure]" OnOpen ="[Event Procedure]" @@ -44,6 +43,8 @@ Begin Form AllowPivotChartView =0 AllowPivotChartView =0 FilterOnLoad =0 + OrderByOnLoad =0 + OrderByOnLoad =0 ShowPageMargins =0 DisplayOnSharePointSite =1 AllowLayoutView =0 @@ -288,7 +289,8 @@ Begin Form LayoutCachedHeight =360 BackColor =14136213 BorderColor =14136213 - HoverColor =15060409 + HoverColor =65280 + HoverThemeColorIndex =-1 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 @@ -346,7 +348,8 @@ Begin Form BackColor =14136213 BorderColor =14136213 ThemeFontIndex =-1 - HoverColor =15060409 + HoverColor =65280 + HoverThemeColorIndex =-1 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 diff --git a/source/forms/LocationList.bas b/source/forms/LocationList.bas index 1c1c5ad..df47cda 100644 --- a/source/forms/LocationList.bas +++ b/source/forms/LocationList.bas @@ -20,9 +20,9 @@ Begin Form Width =7680 DatasheetFontHeight =11 ItemSuffix =36 - Left =1035 + Left =1065 Top =4875 - Right =8415 + Right =8445 Bottom =9240 DatasheetGridlinesColor =14806254 RecSrcDt = Begin @@ -731,13 +731,13 @@ Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = True Attribute VB_PredeclaredId = True Attribute VB_Exposed = False -Option Compare Database + Option Compare Database Option Explicit ' ================================= ' Form: LocationList ' Level: Application form -' Version: 1.04 +' Version: 1.05 ' Basis: Dropdown form ' ' Description: List form object related properties, events, functions & procedures for UI display @@ -750,6 +750,7 @@ Option Explicit ' update forecolor based on tbxIsSensitive value ' BLC - 10/16/2017 - 1.03 - fixed to use tbxID vs. ID on ' BLC - 10/24/2017 - 1.04 - cleared parent form fields on delete +' BLC - 11/24/2017 - 1.05 - revised to requery list & clear msg after deletes ' ================================= '--------------------- @@ -1002,12 +1003,16 @@ End Sub ' Revisions: ' BLC - 5/31/2016 - initial version ' BLC - 9/28/2017 - revised to tbxID vs ID +' BLC - 11/24/2017 - clear any existing msgs ' --------------------------------- Private Sub btnEdit_Click() On Error GoTo Err_Handler 'populate the parent form PopulateForm Me.Parent, tbxID + + Me.Parent.lblMsgIcon.Caption = "" + Me.Parent.lblMsg.Caption = "" Exit_Handler: Exit Sub @@ -1034,6 +1039,7 @@ End Sub ' BLC - 6/1/2016 - initial version ' BLC - 10/16/2017 - revised to use tbxID vs. ID on delete ' BLC - 10/24/2017 - cleared parent form fields +' BLC - 11/24/2017 - requery list after deletes ' --------------------------------- Private Sub btnDelete_Click() On Error GoTo Err_Handler @@ -1066,6 +1072,7 @@ On Error GoTo Err_Handler Me.Parent.cbxCollectionSourceID.ControlSource = "" End If + Me.Parent![list].Requery End If Exit_Handler: diff --git a/source/forms/Main.bas b/source/forms/Main.bas index faeaa19..d6899d0 100644 --- a/source/forms/Main.bas +++ b/source/forms/Main.bas @@ -17,10 +17,10 @@ Begin Form Width =8280 DatasheetFontHeight =11 ItemSuffix =26 - Left =4065 - Top =2295 - Right =12345 - Bottom =10260 + Left =4260 + Top =3225 + Right =12540 + Bottom =11190 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x06dd372434a7e440 @@ -465,7 +465,7 @@ Option Explicit ' ================================= ' Form: Main ' Level: Application form -' Version: 1.08 +' Version: 1.09 ' Basis: Main form ' ' Description: Main switchboard form object related properties, events, functions & procedures for UI display @@ -483,6 +483,7 @@ Option Explicit ' BLC - 10/18/2017 - 1.07 - updated BC to 8 for App Settings (Sheet & ModWentworth) & ' turned off w/o ParkCode since DataSheet settings require ParkCode ' BLC - 10/23/2017 - 1.08 - added Exit button +' BLC - 11/24/2017 - 1.09 - disable Veg Plots & VegWalk for BLCA until feature available (TR - 1,2) ' ================================= '--------------------- @@ -812,6 +813,9 @@ On Error GoTo Err_Handler 'DoCmd.CloseDatabase << leaves the VBE shell 'Dim app As New Access.Application + 'shutdown w/ compact & repair + 'Application.CompactRepair + Application.Quit acQuitSaveNone '<< quit w/o saving to avoid saving control states Exit_Handler: @@ -1068,6 +1072,7 @@ End Sub ' BLC - 9/5/2017 - added BC Loggers link ' BLC - 10/18/2017 - updated BC to 8 for App Settings (Sheet & ModWentworth) & turned off w/o ParkCode ' since DataSheet settings require ParkCode +' BLC - 11/24/2017 - disable Veg Plots & VegWalk for BLCA until Feature is set (TR - 1,2) ' --------------------------------- Private Sub PrepareLinks() On Error GoTo Err_Handler @@ -1115,7 +1120,7 @@ On Error GoTo Err_Handler TL = "1,2,6" 'Site, Feature, Location TC = "1,5,6" 'Event, Locations, People - TR = "1,2,6,7,8" 'Veg Plots, Vegetation Walk, Species, Unknowns, Species Search + TR = "6,7,8" 'Species, Unknowns, Species Search BL = "2,4,7,8" 'Transducers, Survey Files, Upload Survey File, ' Batch Upload Photos BR = "1,2,3,4,5,8" '#Plots, VegPlot-Species, VegPlot-#Species, @@ -1124,8 +1129,9 @@ On Error GoTo Err_Handler If Len(Nz(TempVars("Feature"), "")) > 0 Then TL = "1,2,3,4,6" 'Site, Feature, Transect, Plot, Location TC = "1,3,5,6" 'Event, VegPlots, Locations, People - BL = "1,2,4,7,8" 'Photos, Transducers, Survey Files, Upload Survey File, - ' Batch Upload Photos + TR = "1,2,6,7,8" 'Veg Plots, Vegetation Walk,Species, Unknowns, Species Search + BL = "1,2,4,7,8" 'Photos, Transducers, Survey Files, Upload Survey File, + 'Batch Upload Photos BR = "1,2,3,4,5,8" '#Plots, VegPlot-Species, VegPlot-#Species, ' VegWalk-Species, VegWalk-#Species, More End If diff --git a/source/forms/Panel.bas b/source/forms/Panel.bas index 4d31893..2ebbfde 100644 --- a/source/forms/Panel.bas +++ b/source/forms/Panel.bas @@ -268,7 +268,7 @@ End Property Public Property Let BarColor(Value As Variant) m_BarColor = Value - Me.lineIndicator.borderColor = m_BarColor + Me.lineIndicator.BorderColor = m_BarColor End Property Public Property Get BarColor() diff --git a/source/forms/SetObserverRecorder.bas b/source/forms/SetObserverRecorder.bas index f9c37d5..787851e 100644 --- a/source/forms/SetObserverRecorder.bas +++ b/source/forms/SetObserverRecorder.bas @@ -19,17 +19,16 @@ Begin Form GridY =24 Width =7860 DatasheetFontHeight =11 - ItemSuffix =37 - Left =2955 - Top =2730 - Right =16110 - Bottom =14115 + ItemSuffix =42 + Left =4440 + Top =1455 + Right =12300 + Bottom =11235 DatasheetGridlinesColor =14806254 RecSrcDt = Begin - 0x1ad85127b3cfe440 + 0x747b49e35508e540 End - RecordSource ="Contact" - Caption ="Set Observer & Recorder" + Caption ="Set Observer/Recorder" OnCurrent ="[Event Procedure]" OnOpen ="[Event Procedure]" OnClose ="[Event Procedure]" @@ -124,6 +123,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 @@ -157,7 +172,7 @@ Begin Form AlternateBackShade =95.0 Begin Begin Label - OverlapFlags =85 + OverlapFlags =93 Left =180 Top =60 Width =3480 @@ -165,7 +180,7 @@ Begin Form BorderColor =8355711 ForeColor =16777215 Name ="lblTitle" - Caption ="Set Observer / Recorder" + Caption ="Set Observer/Recorder" GridlineColor =10921638 LayoutCachedLeft =180 LayoutCachedTop =60 @@ -183,7 +198,7 @@ Begin Form BorderColor =8355711 ForeColor =16777164 Name ="lblDirections" - Caption ="directions" + Caption ="Choose the observer && recorder for the record." GridlineColor =10921638 LayoutCachedLeft =180 LayoutCachedTop =420 @@ -223,19 +238,19 @@ Begin Form Overlaps =1 End Begin Label - OverlapFlags =85 + OverlapFlags =215 TextAlign =3 - Left =5820 + Left =3360 Top =60 - Width =1920 + Width =4380 Height =315 FontWeight =600 BorderColor =8355711 ForeColor =6750105 Name ="lblContext" - Caption ="DINO > Yampa" + Caption ="context" GridlineColor =10921638 - LayoutCachedLeft =5820 + LayoutCachedLeft =3360 LayoutCachedTop =60 LayoutCachedWidth =7740 LayoutCachedHeight =375 @@ -245,17 +260,17 @@ Begin Form Begin Label OverlapFlags =93 TextAlign =2 - Left =1440 + Left =1425 Top =960 - Width =2100 + Width =2115 Height =315 FontWeight =500 BorderColor =8355711 ForeColor =16777215 Name ="lblObserver" - Caption ="Observer" + Caption ="Observer(s)" GridlineColor =10921638 - LayoutCachedLeft =1440 + LayoutCachedLeft =1425 LayoutCachedTop =960 LayoutCachedWidth =3540 LayoutCachedHeight =1275 @@ -265,17 +280,17 @@ Begin Form Begin Label OverlapFlags =85 TextAlign =2 - Left =3720 + Left =3705 Top =960 - Width =2040 + Width =2055 Height =315 FontWeight =500 BorderColor =8355711 ForeColor =16777215 Name ="lblRecorder" - Caption ="Recorder" + Caption ="Recorder(s)" GridlineColor =10921638 - LayoutCachedLeft =3720 + LayoutCachedLeft =3705 LayoutCachedTop =960 LayoutCachedWidth =5760 LayoutCachedHeight =1275 @@ -283,20 +298,21 @@ Begin Form ForeTint =100.0 End Begin Label - OverlapFlags =87 + OverlapFlags =215 TextAlign =1 Left =108 Top =960 - Width =1335 + Width =1755 Height =315 FontWeight =500 BorderColor =8355711 - ForeColor =16777215 + ForeColor =6750156 Name ="lblRecordRefID" + Caption ="VegPlot ID # 6" GridlineColor =10921638 LayoutCachedLeft =108 LayoutCachedTop =960 - LayoutCachedWidth =1443 + LayoutCachedWidth =1863 LayoutCachedHeight =1275 ForeThemeColorIndex =-1 ForeTint =100.0 @@ -305,7 +321,7 @@ Begin Form End Begin Section CanGrow = NotDefault - Height =5340 + Height =8475 Name ="Detail" AlternateBackColor =15921906 AlternateBackThemeColorIndex =1 @@ -313,6 +329,7 @@ Begin Form BackThemeColorIndex =1 Begin Begin CommandButton + Enabled = NotDefault OverlapFlags =85 Left =6720 Top =60 @@ -390,7 +407,7 @@ Begin Form FontSize =9 TabIndex =2 BorderColor =8355711 - ForeColor =690698 + ForeColor =255 Name ="tbxIcon" GridlineColor =10921638 @@ -472,9 +489,9 @@ Begin Form End Begin Subform CanShrink = NotDefault - OverlapFlags =247 + OverlapFlags =215 Left =105 - Top =840 + Top =3975 Width =7650 Height =4380 TabIndex =3 @@ -484,25 +501,25 @@ Begin Form GridlineColor =10921638 LayoutCachedLeft =105 - LayoutCachedTop =840 + LayoutCachedTop =3975 LayoutCachedWidth =7755 - LayoutCachedHeight =5220 + LayoutCachedHeight =8355 End Begin Rectangle SpecialEffect =0 BackStyle =1 OldBorderStyle =0 OverlapFlags =93 - Top =720 + Top =3855 Width =7860 Height =4620 BackColor =4144959 BorderColor =10921638 Name ="rctList" GridlineColor =10921638 - LayoutCachedTop =720 + LayoutCachedTop =3855 LayoutCachedWidth =7860 - LayoutCachedHeight =5340 + LayoutCachedHeight =8475 BackThemeColorIndex =-1 End Begin TextBox @@ -516,11 +533,10 @@ Begin Form Width =240 Height =300 FontSize =9 - TabIndex =5 + TabIndex =4 BorderColor =8355711 ForeColor =8355711 Name ="tbxID" - ControlSource ="ID" DefaultValue ="0" GridlineColor =10921638 @@ -533,33 +549,73 @@ Begin Form BorderShade =100.0 ForeTint =50.0 End - Begin ComboBox - LimitToList = NotDefault - OverlapFlags =85 + Begin Label + BackStyle =1 + OverlapFlags =223 + TextAlign =3 + Top =3660 + 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 =3660 + LayoutCachedWidth =7860 + LayoutCachedHeight =3975 + ThemeFontIndex =-1 + BackThemeColorIndex =-1 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin Label + OverlapFlags =223 TextAlign =2 + Left =4320 + Top =3480 + Width =825 + Height =600 + FontSize =20 + BackColor =4144959 + BorderColor =8355711 + ForeColor =16772541 + Name ="lblMsgIcon" + FontName ="Segoe UI" + GridlineColor =10921638 + LayoutCachedLeft =4320 + LayoutCachedTop =3480 + LayoutCachedWidth =5145 + LayoutCachedHeight =4080 + ThemeFontIndex =-1 + BackThemeColorIndex =-1 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin ListBox + ColumnHeads = NotDefault + OverlapFlags =85 + MultiSelect =2 IMESentenceMode =3 ColumnCount =2 Left =1380 Top =60 Width =2160 - Height =315 FontSize =8 - TabIndex =4 - BackColor =65535 - BorderColor =10921638 + TabIndex =5 ForeColor =4210752 - ConditionalFormat = Begin - 0x010000009a000000020000000100000000000000000000001800000001000000 , - 0x00000000fff200000000000003000000190000001c0000000100000000000000 , - 0xffffff0000000000000000000000000000000000000000000000000000000000 , - 0x5b007400620078005300740061007200740044006100740065005d002e005600 , - 0x61006c00750065003d0022002200000000002200220000000000 - End - Name ="cbxObserver" + BorderColor =10921638 + Name ="lbxObserver" RowSourceType ="Table/Query" ColumnWidths ="0;2160" AfterUpdate ="[Event Procedure]" - ControlTipText ="Select data observer" + OnDblClick ="[Event Procedure]" + ControlTipText ="Select data observer(s)" GridlineColor =10921638 AllowValueListEdits =0 @@ -568,44 +624,26 @@ Begin Form LayoutCachedWidth =3540 LayoutCachedHeight =375 BackThemeColorIndex =-1 - ForeThemeColorIndex =0 - ForeTint =75.0 - ForeShade =100.0 - ConditionalFormat14 = Begin - 0x01000200000001000000000000000100000000000000fff20000170000005b00 , - 0x7400620078005300740061007200740044006100740065005d002e0056006100 , - 0x6c00750065003d00220022000000000000000000000000000000000000000000 , - 0x0000000000030000000100000000000000ffffff000200000022002200000000 , - 0x000000000000000000000000000000000000 - End End - Begin ComboBox - LimitToList = NotDefault - OverlapFlags =93 - TextAlign =2 + Begin ListBox + ColumnHeads = NotDefault + OverlapFlags =85 + MultiSelect =2 IMESentenceMode =3 ColumnCount =2 Left =3660 Top =60 Width =2160 - Height =315 FontSize =8 TabIndex =6 - BackColor =65535 - BorderColor =10921638 ForeColor =4210752 - ConditionalFormat = Begin - 0x010000009a000000020000000100000000000000000000001800000001000000 , - 0x00000000fff200000000000003000000190000001c0000000100000000000000 , - 0xffffff0000000000000000000000000000000000000000000000000000000000 , - 0x5b007400620078005300740061007200740044006100740065005d002e005600 , - 0x61006c00750065003d0022002200000000002200220000000000 - End - Name ="cbxRecorder" + BorderColor =10921638 + Name ="lbxRecorder" RowSourceType ="Table/Query" ColumnWidths ="0;2160" AfterUpdate ="[Event Procedure]" - ControlTipText ="Select data recorder" + OnDblClick ="[Event Procedure]" + ControlTipText ="Select data recorder(s)" GridlineColor =10921638 AllowValueListEdits =0 @@ -614,63 +652,108 @@ Begin Form LayoutCachedWidth =5820 LayoutCachedHeight =375 BackThemeColorIndex =-1 - ForeThemeColorIndex =0 - ForeTint =75.0 - ForeShade =100.0 - ConditionalFormat14 = Begin - 0x01000200000001000000000000000100000000000000fff20000170000005b00 , - 0x7400620078005300740061007200740044006100740065005d002e0056006100 , - 0x6c00750065003d00220022000000000000000000000000000000000000000000 , - 0x0000000000030000000100000000000000ffffff000200000022002200000000 , - 0x000000000000000000000000000000000000 - End + End + Begin ListBox + RowSourceTypeInt =1 + OverlapFlags =85 + MultiSelect =2 + IMESentenceMode =3 + ColumnCount =2 + Left =1380 + Top =1920 + Width =2160 + FontSize =8 + TabIndex =7 + ForeColor =4210752 + BorderColor =10921638 + Name ="lbxObservers" + RowSourceType ="Value List" + ColumnWidths ="0;2160" + OnDblClick ="[Event Procedure]" + ControlTipText ="Select data observer(s)" + GridlineColor =10921638 + AllowValueListEdits =0 + + LayoutCachedLeft =1380 + LayoutCachedTop =1920 + LayoutCachedWidth =3540 + LayoutCachedHeight =3360 + BackThemeColorIndex =-1 + End + Begin ListBox + RowSourceTypeInt =1 + OverlapFlags =85 + MultiSelect =2 + IMESentenceMode =3 + ColumnCount =2 + Left =3660 + Top =1920 + Width =2160 + FontSize =8 + TabIndex =8 + ForeColor =4210752 + BorderColor =10921638 + Name ="lbxRecorders" + RowSourceType ="Value List" + ColumnWidths ="0;2160" + OnDblClick ="[Event Procedure]" + ControlTipText ="Select data recorder(s)" + GridlineColor =10921638 + AllowValueListEdits =0 + + LayoutCachedLeft =3660 + LayoutCachedTop =1920 + LayoutCachedWidth =5820 + LayoutCachedHeight =3360 + BackThemeColorIndex =-1 End Begin Label - BackStyle =1 - OverlapFlags =223 - TextAlign =3 - Top =525 - Width =7860 + OverlapFlags =85 + Left =120 + Top =1560 + Width =2355 + Height =300 + BorderColor =8355711 + ForeColor =8355711 + Name ="lblDir" + Caption ="Choose at least 1 of each" + GridlineColor =10921638 + LayoutCachedLeft =120 + LayoutCachedTop =1560 + LayoutCachedWidth =2475 + LayoutCachedHeight =1860 + End + Begin Label + OverlapFlags =85 + Left =3480 + Top =1560 + Width =360 Height =315 - FontSize =9 - LeftMargin =360 - TopMargin =36 - RightMargin =360 - BackColor =4144959 BorderColor =8355711 - ForeColor =6750105 - Name ="lblMsg" - FontName ="Segoe UI" + ForeColor =8355711 + Name ="lblDownArrow" GridlineColor =10921638 - LayoutCachedTop =525 - LayoutCachedWidth =7860 - LayoutCachedHeight =840 - ThemeFontIndex =-1 - BackThemeColorIndex =-1 - ForeThemeColorIndex =-1 - ForeTint =100.0 + LayoutCachedLeft =3480 + LayoutCachedTop =1560 + LayoutCachedWidth =3840 + LayoutCachedHeight =1875 End Begin Label - OverlapFlags =255 - TextAlign =2 - Left =4320 - Top =345 - Width =825 - Height =600 - FontSize =20 - BackColor =4144959 + OverlapFlags =85 + Left =5940 + Top =1380 + Width =1500 + Height =780 + FontSize =8 BorderColor =8355711 - ForeColor =6750105 - Name ="lblMsgIcon" - Caption ="icon" - FontName ="Segoe UI" + ForeColor =16711680 + Name ="lblHintMoves" + Caption ="Double click to move up or down, SHIFT click to move multiple items" GridlineColor =10921638 - LayoutCachedLeft =4320 - LayoutCachedTop =345 - LayoutCachedWidth =5145 - LayoutCachedHeight =945 - ThemeFontIndex =-1 - BackThemeColorIndex =-1 + LayoutCachedLeft =5940 + LayoutCachedTop =1380 + LayoutCachedWidth =7440 + LayoutCachedHeight =2160 ForeThemeColorIndex =-1 ForeTint =100.0 End @@ -696,7 +779,7 @@ Option Explicit ' ================================= ' Form: SetObserverRecorder ' Level: Application form -' Version: 1.01 +' Version: 1.02 ' Basis: Dropdown form ' ' Description: Observer / recorder setting form object related properties, events, functions & procedures for UI display @@ -705,6 +788,7 @@ Option Explicit ' References: - ' Revisions: BLC - 9/1/2016 - 1.00 - initial version ' BLC - 10/19/2017 - 1.01 - added comment length & replaced event w/ observerrecorder +' BLC - 12/5/2017 - 1.02 - updated for multiple observers/recorders ' ================================= '--------------------- @@ -732,6 +816,8 @@ Private m_RecorderID As Long Private m_RAAction As String Private m_RAContactID As Long +Private m_ActionDate As Date + '--------------------- ' Event Declarations '--------------------- @@ -883,6 +969,13 @@ Public Property Let RAContactID(Value As Long) m_RAContactID = Value End Property +Public Property Get ActionDate() As Date + ActionDate = m_ActionDate +End Property + +Public Property Let ActionDate(Value As Date) + m_ActionDate = Value +End Property '--------------------- ' Methods @@ -900,6 +993,7 @@ End Property ' Adapted: - ' Revisions: ' BLC - 9/8/2016 - initial version +' BLC - 12/5/2017 - update for multiple observers/recorders ' --------------------------------- Private Sub Form_Open(Cancel As Integer) On Error GoTo Err_Handler @@ -918,6 +1012,7 @@ On Error GoTo Err_Handler 'set properties Me.RefTable = Me.CallingForm Me.RefID = Split(Me.OpenArgs, "|")(1) + Me.ActionDate = Split(Me.OpenArgs, "|")(2) End If @@ -926,8 +1021,9 @@ On Error GoTo Err_Handler 'set context - based on TempVars lblContext.ForeColor = lngLime - lblContext.Caption = Nz(TempVars("ParkCode"), "") & Space(2) & ">" & Space(2) & _ - Nz(TempVars("River"), "") + 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." @@ -949,16 +1045,59 @@ On Error GoTo Err_Handler btnSave.Enabled = False lblMsgIcon.Caption = "" lblMsg.Caption = "" + lblDir.Caption = "Choose at least 1 of each" + lblDownArrow.Caption = StringFromCodepoint(uDArrow) + lblHintMoves.Caption = "Double click to move up or down, SHIFT click to move multiple items" + lbxObservers.BackColor = lngWhite + lbxRecorders.BackColor = lngWhite + lbxObservers.BackColor = lngYellow + lbxRecorders.BackColor = lngYellow + + 'set as multiselect listboxes + '2 = Extended - SHFT click to move multiples +' lbxObserver.MultiSelect = 2 +' lbxRecorder.MultiSelect = 2 +' lbxObservers.MultiSelect = 2 +' lbxRecorders.MultiSelect = 2 'ID default -> value used only for edits of existing table values tbxID.DefaultValue = 0 + 'hide unused controls + btnUndo.Visible = False + tbxID.Visible = False + 'clear form datasource in case it was saved (to keep unbound) Me.RecordSource = "" 'set data sources - Set cbxObserver.Recordset = GetRecords("s_contact_list") - Set cbxRecorder.Recordset = GetRecords("s_contact_list") + Set lbxObserver.Recordset = GetRecords("s_contact_list") + Set lbxRecorder.Recordset = GetRecords("s_contact_list") + lbxObserver.BoundColumn = 1 + lbxObserver.ColumnHeads = True + 'lbxObserver.ColumnWidths = "" + lbxRecorder.BoundColumn = 1 + lbxRecorder.ColumnHeads = True + 'lbxRecorder.ColumnHeads = "" + lbxObservers.BoundColumn = 1 + lbxRecorders.BoundColumn = 1 + + 'set columns same for selected Observers/Recorders + lbxObservers.ColumnWidths = lbxObserver.ColumnWidths + lbxRecorders.ColumnWidths = lbxRecorder.ColumnWidths + + 'clear selected Observers/Recorders + lbxObservers.RowSource = "" + lbxRecorders.RowSource = "" + + 'set list data source + Dim Params(0 To 2) As Variant + + Params(0) = Me.RefTable + Params(1) = Me.RefID + + Set Me.list.Form.Recordset = GetRecords("s_record_action_by_refID", Params) + Me.list.Form.Requery 'initialize values ClearForm Me @@ -1068,22 +1207,108 @@ Err_Handler: End Sub ' --------------------------------- -' Sub: cbxObserver_AfterUpdate +' Sub: lbxObserver_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 5, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 9/8/2016 - initial version +' BLC - 12/5/2017 - initial version +' --------------------------------- +Private Sub lbxObserver_AfterUpdate() +On Error GoTo Err_Handler + + 'Me.ObserverID = lbxObserver.Value + + 'ReadyForSave + 'lbxObservers.AddItem lbxObserver.Column(0) + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - lbxObserver_AfterUpdate[SetObserverObserver form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: lbxRecorder_AfterUpdate +' Description: Listbox double click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, December 5, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/5/2017 - initial version ' --------------------------------- -Private Sub cbxObserver_AfterUpdate() +Private Sub lbxRecorder_AfterUpdate() On Error GoTo Err_Handler - Me.ObserverID = cbxObserver.Value + 'Me.RecorderID = lbxRecorder.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 & " - lbxRecorder_AfterUpdate[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: lbxObserver_DblClick +' Description: Listbox double click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, December 5, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/5/2017 - initial version +' --------------------------------- +Private Sub lbxObserver_DblClick(Cancel As Integer) +On Error GoTo Err_Handler + + 'Me.ObserverID = lbxObserver.Value + + 'ReadyForSave + Dim i As Integer + + With lbxObservers + For i = 0 To lbxObserver.ListCount - 1 + If lbxObserver.Selected(i) Then + '.ItemData(.NewIndex) = lbxObserver.Column(0) + 'check if duplicate + If Not IsDupeItem(lbxObservers, lbxObserver.ItemData(i)) Then _ + .AddItem item:=lbxObserver.Column(0, i) & ";" & lbxObserver.Column(1, i) + '.AddItem item:=lbxObserver.ListIndex & ";" & lbxObserver.Column(1) + End If + +' lbxObserver.RemoveItem lbxObserver.ListIndex + Next + + If .ListCount > 0 Then + .BackColor = lngWhite + Else + .BackColor = lngYellow + End If + End With ReadyForSave @@ -1093,28 +1318,132 @@ 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 & " - lbxObserver_DblClick[SetObserverObserver form])" End Select Resume Exit_Handler End Sub ' --------------------------------- -' Sub: cbxRecorder_AfterUpdate -' Description: Dropdown after update actions +' Sub: lbxRecorder_DblClick +' Description: Listbox double click actions ' Assumptions: - ' Parameters: - ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 5, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 9/8/2016 - initial version +' BLC - 12/5/2017 - initial version +' --------------------------------- +Private Sub lbxRecorder_DblClick(Cancel As Integer) +On Error GoTo Err_Handler + + 'Me.RecorderID = lbxRecorder.Value + + 'ReadyForSave + Dim i As Integer + + With lbxRecorders + For i = 0 To lbxRecorder.ListCount - 1 + If lbxRecorder.Selected(i) Then + '.ItemData(.NewIndex) = lbxRecorder.Column(0) + + 'check if duplicate + If Not IsDupeItem(lbxRecorders, lbxRecorder.ItemData(i)) Then _ + .AddItem item:=lbxRecorder.Column(0, i) & ";" & lbxRecorder.Column(1, i) + End If + Next + + If .ListCount > 0 Then + .BackColor = lngWhite + Else + .BackColor = lngYellow + End If + + End With + + ReadyForSave + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - lbxRecorder_DblClick[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: lbxObservers_DblClick +' Description: Listbox double click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, December 5, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/5/2017 - initial version +' --------------------------------- +Private Sub lbxObservers_DblClick(Cancel As Integer) +On Error GoTo Err_Handler + + Dim i As Integer + + With lbxObservers + For i = 0 To lbxObservers.ListCount - 1 + If lbxObservers.Selected(i) Then + .RemoveItem lbxObservers.ListIndex + End If + Next + End With + + If ListHasItems(lbxObservers) = False Then lbxObservers.BackColor = lngYellow + + ReadyForSave + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - lbxObserver_DblClick[SetObserverObserver form])" + End Select + Resume Exit_Handler +End Sub + ' --------------------------------- -Private Sub cbxRecorder_AfterUpdate() +' Sub: lbxRecorders_DblClick +' Description: Listbox double click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, December 5, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/5/2017 - initial version +' --------------------------------- +Private Sub lbxRecorders_DblClick(Cancel As Integer) On Error GoTo Err_Handler - Me.RecorderID = cbxRecorder.Value + Dim i As Integer + + With lbxRecorders + For i = 0 To lbxRecorders.ListCount - 1 + If lbxRecorders.Selected(i) Then + .RemoveItem lbxRecorders.ListIndex + End If + Next + End With + + If ListHasItems(lbxRecorders) = False Then lbxRecorders.BackColor = lngYellow ReadyForSave @@ -1124,7 +1453,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 & " - lbxRecorder_DblClick[SetObserverRecorder form])" End Select Resume Exit_Handler End Sub @@ -1171,6 +1500,7 @@ End Sub ' Revisions: ' BLC - 9/8/2016 - initial version ' BLC - 9/1/2016 - cleanup commented code +' BLC - 12/5/2017 - updated for multiple observers/recorders ' --------------------------------- Private Sub btnSave_Click() On Error GoTo Err_Handler @@ -1193,7 +1523,23 @@ On Error GoTo Err_Handler ' ' UpsertRecord Me - SetObserverRecorder Me, Me.RefTable + 'ensure RefTable & RefID are set + If Len(Me.RefTable) > 0 And Me.RefID > 0 And IsDate(Me.ActionDate) Then + + Dim i As Integer + + For i = 0 To lbxObservers.ListCount - 1 + Debug.Print "O:" & lbxObservers.ItemData(i) + SetObserverRecorder Me, Me.RefTable, "O", CLng(lbxObservers.ItemData(i)) + Next + + For i = 0 To lbxRecorders.ListCount - 1 + Debug.Print "R:" & lbxRecorders.ItemData(i) + SetObserverRecorder Me, Me.RefTable, "R", CLng(lbxRecorders.ItemData(i)) + Next + 'SetObserverRecorder Me, Me.RefTable, action, ContactID + + End If Me![list].Form.Requery @@ -1286,6 +1632,7 @@ End Sub ' Revisions: ' BLC - 9/8/2016 - initial version ' BLC - 8/23/2016 - changed ReadyForSave() to public for mod_App_Data Upsert/SetRecord() +' BLC - 12/5/2017 - update for multiple observer/recorder ' --------------------------------- Public Sub ReadyForSave() On Error GoTo Err_Handler @@ -1297,9 +1644,9 @@ On Error GoTo Err_Handler 'set color of icon depending on if values are set 'requires: site ID, location ID, protocol ID, start date - 'If IsDate(tbxStartDate) Then + If lbxObservers.ListCount > 0 And lbxRecorders.ListCount Then isOK = True - 'End If + End If tbxIcon.ForeColor = IIf(isOK = True, lngDkGreen, lngRed) btnSave.Enabled = isOK @@ -1346,3 +1693,81 @@ Err_Handler: End Select Resume Exit_Handler End Sub + +' --------------------------------- +' Function: IsDupeItem +' Description: Determine if a list item is already present +' Assumptions: - +' Parameters: lbx - Listbox to check (listbox) +' item - item being added (variant) +' Returns: DupeItem - whether the item is a duplicate or not (boolean) +' Throws: none +' References: - +' Source/date: Bonnie Campbell, December 5, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/5/2017 - initial version +' --------------------------------- +Public Function IsDupeItem(lbx As ListBox, item As Variant) As Boolean +On Error GoTo Err_Handler + + Dim DupeItem As Boolean + Dim i As Integer + + 'default + DupeItem = False + + For i = 0 To lbx.ListCount - 1 + +' If lbx.ListIndex = item Then DupeItem = True + + If lbx.ItemData(i) = item Then + DupeItem = True + Exit For + End If + Next + +Exit_Handler: + IsDupeItem = DupeItem + Exit Function +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - IsDupeItem[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Function + +' --------------------------------- +' Function: ListHasItems +' Description: Determine if a list has items +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, December 5, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 12/5/2017 - initial version +' --------------------------------- +Public Function ListHasItems(lbx As ListBox) As Boolean +On Error GoTo Err_Handler + + If lbx.ListCount > 0 Then + ListHasItems = True + Else + ListHasItems = False + End If + +Exit_Handler: + Exit Function +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - ListHasItems[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Function diff --git a/source/forms/SetObserverRecorderList.bas b/source/forms/SetObserverRecorderList.bas index dd9cc3d..3c87c38 100644 --- a/source/forms/SetObserverRecorderList.bas +++ b/source/forms/SetObserverRecorderList.bas @@ -20,11 +20,11 @@ Begin Form Width =7560 DatasheetFontHeight =11 ItemSuffix =38 - Right =13155 + Right =8940 Bottom =11385 DatasheetGridlinesColor =14806254 RecSrcDt = Begin - 0x7ce3e0e10ec7e440 + 0xa998d3ec5708e540 End Caption ="_List" OnCurrent ="[Event Procedure]" @@ -41,6 +41,8 @@ Begin Form AllowPivotChartView =0 AllowPivotChartView =0 FilterOnLoad =0 + OrderByOnLoad =0 + OrderByOnLoad =0 ShowPageMargins =0 DisplayOnSharePointSite =1 AllowLayoutView =0 @@ -163,8 +165,8 @@ Begin Form BorderColor =8355711 ForeColor =16777164 Name ="lblDirections" - 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." + Caption ="Edit records using the buttons for the record at right.\015\012Icon codes at lef" + "t identify if record may be edited." GridlineColor =10921638 LayoutCachedLeft =180 LayoutCachedTop =120 @@ -311,7 +313,8 @@ Begin Form LayoutCachedHeight =360 BackColor =14136213 BorderColor =14136213 - HoverColor =15060409 + HoverColor =65280 + HoverThemeColorIndex =-1 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 @@ -327,7 +330,7 @@ Begin Form BackStyle =0 IMESentenceMode =3 Left =60 - Top =45 + Top =60 Width =720 Height =300 FontSize =9 @@ -338,9 +341,9 @@ Begin Form GridlineColor =10921638 LayoutCachedLeft =60 - LayoutCachedTop =45 + LayoutCachedTop =60 LayoutCachedWidth =780 - LayoutCachedHeight =345 + LayoutCachedHeight =360 BorderThemeColorIndex =0 BorderTint =50.0 BorderShade =100.0 @@ -369,7 +372,8 @@ Begin Form BackColor =14136213 BorderColor =14136213 ThemeFontIndex =-1 - HoverColor =15060409 + HoverColor =65280 + HoverThemeColorIndex =-1 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 @@ -387,7 +391,7 @@ Begin Form BackStyle =0 IMESentenceMode =3 Left =3660 - Top =45 + Top =60 Width =735 Height =300 TabIndex =3 @@ -398,9 +402,9 @@ Begin Form GridlineColor =10921638 LayoutCachedLeft =3660 - LayoutCachedTop =45 + LayoutCachedTop =60 LayoutCachedWidth =4395 - LayoutCachedHeight =345 + LayoutCachedHeight =360 ForeThemeColorIndex =2 ForeTint =100.0 ForeShade =50.0 @@ -413,9 +417,10 @@ Begin Form BackStyle =0 IMESentenceMode =3 Left =840 - Top =30 - Width =360 + Top =45 + Width =540 Height =315 + FontSize =9 TabIndex =4 BorderColor =10921638 ForeColor =4210752 @@ -424,9 +429,9 @@ Begin Form GridlineColor =10921638 LayoutCachedLeft =840 - LayoutCachedTop =30 - LayoutCachedWidth =1200 - LayoutCachedHeight =345 + LayoutCachedTop =45 + LayoutCachedWidth =1380 + LayoutCachedHeight =360 End Begin TextBox Enabled = NotDefault @@ -435,10 +440,11 @@ Begin Form TextAlign =2 BackStyle =0 IMESentenceMode =3 - Left =4620 + Left =4500 Top =60 - Width =1140 + Width =1380 Height =300 + FontSize =9 TabIndex =5 BorderColor =10921638 ForeColor =4138256 @@ -446,9 +452,9 @@ Begin Form ControlSource ="ActionDate" GridlineColor =10921638 - LayoutCachedLeft =4620 + LayoutCachedLeft =4500 LayoutCachedTop =60 - LayoutCachedWidth =5760 + LayoutCachedWidth =5880 LayoutCachedHeight =360 ForeThemeColorIndex =2 ForeTint =100.0 @@ -461,9 +467,9 @@ Begin Form TextAlign =2 BackStyle =0 IMESentenceMode =3 - Left =1260 + Left =1440 Top =60 - Width =2280 + Width =2100 Height =300 TabIndex =6 BorderColor =10921638 @@ -472,7 +478,7 @@ Begin Form ControlSource ="ContactName" GridlineColor =10921638 - LayoutCachedLeft =1260 + LayoutCachedLeft =1440 LayoutCachedTop =60 LayoutCachedWidth =3540 LayoutCachedHeight =360 @@ -619,6 +625,9 @@ End Property Private Sub Form_Open(Cancel As Integer) On Error GoTo Err_Handler + 'default + Me.RecordSource = "" + lblTitle.Caption = "" lblDirections.Caption = "Edit records using the buttons for the record at right." _ & vbCrLf & "Icon codes at left identify if record may be edited." @@ -633,10 +642,13 @@ On Error GoTo Err_Handler btnDelete.Caption = StringFromCodepoint(uDelete) btnDelete.ForeColor = lngRed - 'hide delete! - btnDelete.Visible = False + 'hide delete! < no + btnDelete.Visible = True - Me.RecordSource = GetTemplate("s_record_action_by_refID") + 'Dim Params(0 To 2) As Variant + 'Params(0) = Me + 'Params (1) + 'Me.RecordSource = GetTemplate("s_record_action_by_refID", Params) Exit_Handler: Exit Sub @@ -756,6 +768,7 @@ End Sub ' Revisions: ' BLC - 6/1/2016 - initial version ' BLC - 10/16/2017 - revised to RecordAction table on delete +' BLC - 12/5/2017 - update for using msg & icon vs. msgoverlay ' --------------------------------- Private Sub btnDelete_Click() On Error GoTo Err_Handler @@ -766,7 +779,29 @@ On Error GoTo Err_Handler result = MsgBox("Delete Record this record: #" & tbxID & " ?" _ & vbCrLf & "This action cannot be undone.", vbYesNo, "Delete Record?") - If result = vbYes Then DeleteRecord "RecordAction", tbxID + If result = vbYes Then + + DeleteRecord "RecordAction", tbxID, False + + Me.Parent.lblMsgIcon.ForeColor = lngLtLime + Me.Parent.lblMsg.ForeColor = lngLtLime + Me.Parent.lblMsgIcon.Caption = StringFromCodepoint(uRTriangle) & _ + StringFromCodepoint(uRTriangle) + Me.Parent.lblMsg.Caption = "Record deleted!" + + If Me.Parent.tbxID > 0 Then + 'clear the deleted record + Me.Requery + + 'clear parent form + 'clear fields + ClearForm Me.Parent + + End If + + ' Me.Parent![list].Requery + + End If 'clear the deleted record Me.Requery diff --git a/source/forms/SetObserverRecorder_old.bas b/source/forms/SetObserverRecorder_old.bas new file mode 100644 index 0000000..989cbd2 --- /dev/null +++ b/source/forms/SetObserverRecorder_old.bas @@ -0,0 +1,1358 @@ +Version =20 +VersionRequired =20 +Begin Form + AllowFilters = NotDefault + PopUp = NotDefault + RecordSelectors = NotDefault + AutoCenter = NotDefault + NavigationButtons = NotDefault + AllowDeletions = NotDefault + DividingLines = NotDefault + AllowAdditions = NotDefault + DefaultView =0 + ScrollBars =0 + ViewsAllowed =1 + BorderStyle =1 + PictureAlignment =2 + DatasheetGridlinesBehavior =3 + GridX =24 + GridY =24 + Width =7860 + DatasheetFontHeight =11 + ItemSuffix =37 + Left =3525 + Top =2490 + Right =16275 + Bottom =13875 + DatasheetGridlinesColor =14806254 + RecSrcDt = Begin + 0x26c502515408e540 + End + Caption ="Set Observer/Recorder" + OnCurrent ="[Event Procedure]" + OnOpen ="[Event Procedure]" + OnClose ="[Event Procedure]" + DatasheetFontName ="Calibri" + PrtMip = Begin + 0x6801000068010000680100006801000000000000201c0000e010000001000000 , + 0x010000006801000000000000a10700000100000001000000 + End + OnLoad ="[Event Procedure]" + AllowDatasheetView =0 + AllowPivotTableView =0 + AllowPivotChartView =0 + AllowPivotChartView =0 + FilterOnLoad =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 CommandButton + FontSize =11 + FontWeight =400 + FontName ="Calibri" + ForeThemeColorIndex =0 + ForeTint =75.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + UseTheme =1 + Shape =1 + Gradient =12 + BackThemeColorIndex =4 + BackTint =60.0 + BorderLineStyle =0 + BorderColor =16777215 + BorderThemeColorIndex =4 + BorderTint =60.0 + ThemeFontIndex =1 + HoverThemeColorIndex =4 + HoverTint =40.0 + PressedThemeColorIndex =4 + PressedShade =75.0 + HoverForeThemeColorIndex =0 + HoverForeTint =75.0 + PressedForeThemeColorIndex =0 + PressedForeTint =75.0 + End + Begin TextBox + AddColon = NotDefault + FELineBreak = NotDefault + BorderLineStyle =0 + LabelX =-1800 + FontSize =11 + FontName ="Calibri" + AsianLineBreak =1 + BackThemeColorIndex =1 + BorderThemeColorIndex =1 + BorderShade =65.0 + ThemeFontIndex =1 + ForeThemeColorIndex =0 + ForeTint =75.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + End + Begin ComboBox + AddColon = NotDefault + BorderLineStyle =0 + LabelX =-1800 + FontSize =11 + FontName ="Calibri" + AllowValueListEdits =1 + InheritValueList =1 + ThemeFontIndex =1 + BackThemeColorIndex =1 + BorderThemeColorIndex =1 + BorderShade =65.0 + ForeThemeColorIndex =2 + ForeShade =50.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + End + Begin Subform + BorderLineStyle =0 + BorderThemeColorIndex =1 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + BorderShade =65.0 + ShowPageHeaderAndPageFooter =1 + End + Begin FormHeader + Height =1320 + BackColor =4144959 + Name ="FormHeader" + AlternateBackThemeColorIndex =1 + AlternateBackShade =95.0 + Begin + Begin Label + OverlapFlags =93 + Left =180 + Top =60 + Width =3480 + Height =300 + BorderColor =8355711 + ForeColor =16777215 + Name ="lblTitle" + Caption ="Set Observer/Recorder" + GridlineColor =10921638 + LayoutCachedLeft =180 + LayoutCachedTop =60 + LayoutCachedWidth =3660 + LayoutCachedHeight =360 + ForeThemeColorIndex =1 + ForeTint =100.0 + End + Begin Label + OverlapFlags =85 + Left =180 + Top =420 + Width =6840 + Height =315 + BorderColor =8355711 + ForeColor =16777164 + Name ="lblDirections" + Caption ="Choose the observer && recorder for the record." + GridlineColor =10921638 + LayoutCachedLeft =180 + LayoutCachedTop =420 + LayoutCachedWidth =7020 + LayoutCachedHeight =735 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin CommandButton + Enabled = NotDefault + OverlapFlags =85 + Left =6660 + Top =900 + Width =720 + ForeColor =16711680 + Name ="btnComment" + Caption ="" + OnClick ="[Event Procedure]" + GridlineColor =10921638 + + LayoutCachedLeft =6660 + LayoutCachedTop =900 + LayoutCachedWidth =7380 + LayoutCachedHeight =1260 + 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 =3 + Left =3360 + Top =60 + Width =4380 + Height =315 + FontWeight =600 + BorderColor =8355711 + ForeColor =6750105 + Name ="lblContext" + Caption ="BLCA > Gunnison > EP > C" + GridlineColor =10921638 + LayoutCachedLeft =3360 + LayoutCachedTop =60 + LayoutCachedWidth =7740 + LayoutCachedHeight =375 + 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 + Width =1755 + Height =315 + FontWeight =500 + BorderColor =8355711 + ForeColor =6750156 + Name ="lblRecordRefID" + Caption ="VegPlot ID # 6" + GridlineColor =10921638 + LayoutCachedLeft =108 + LayoutCachedTop =960 + LayoutCachedWidth =1863 + LayoutCachedHeight =1275 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + End + End + Begin Section + CanGrow = NotDefault + Height =5340 + Name ="Detail" + AlternateBackColor =15921906 + AlternateBackThemeColorIndex =1 + AlternateBackShade =95.0 + BackThemeColorIndex =1 + Begin + Begin CommandButton + Enabled = NotDefault + OverlapFlags =85 + Left =6720 + Top =60 + Width =720 + TabIndex =2 + ForeColor =4210752 + Name ="btnSave" + Caption ="Edit" + OnClick ="[Event Procedure]" + ControlTipText ="Save Record" + GridlineColor =10921638 + ImageData = Begin + 0x2800000010000000100000000100200000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x000000000000000000000000d0687050c06860ffb05850ffa05050ffa05050ff , + 0xa05050ff904850ff904840ff904840ff804040ff803840ff803840ff703840ff , + 0x703830ff0000000000000000d06870fff09090ffe08080ffb04820ff403020ff , + 0xc0b8b0ffc0b8b0ffd0c0c0ffd0c8c0ff505050ffa04030ffa04030ffa03830ff , + 0x703840ff0000000000000000d07070ffff98a0fff08880ffe08080ff705850ff , + 0x404030ff907870fff0e0e0fff0e8e0ff908070ffa04030ffa04040ffa04030ff , + 0x803840ff0000000000000000d07870ffffa0a0fff09090fff08880ff705850ff , + 0x000000ff404030fff0d8d0fff0e0d0ff807860ffb04840ffb04840ffa04040ff , + 0x804040ff0000000000000000d07880ffffa8b0ffffa0a0fff09090ff705850ff , + 0x705850ff705850ff705850ff706050ff806860ffc05850ffb05050ffb04840ff , + 0x804040ff0000000000000000e08080ffffb0b0ffffb0b0ffffa0a0fff09090ff , + 0xf08880ffe08080ffe07880ffd07070ffd06870ffc06060ffc05850ffb05050ff , + 0x904840ff0000000000000000e08890ffffb8c0ffffb8b0ffd06060ffc06050ff , + 0xc05850ffc05040ffb05030ffb04830ffa04020ffa03810ffc06060ffc05850ff , + 0x904840ff0000000000000000e09090ffffc0c0ffd06860ffffffffffffffffff , + 0xfff8f0fff0f0f0fff0e8e0fff0d8d0ffe0d0c0ffe0c8c0ffa03810ffc06060ff , + 0x904850ff0000000000000000e098a0ffffc0c0ffd07070ffffffffffffffffff , + 0xfffffffffff8f0fff0f0f0fff0e8e0fff0d8d0ffe0d0c0ffa04020ffd06860ff , + 0xa05050ff0000000000000000f0a0a0ffffc0c0ffe07870ffffffffffffffffff , + 0xfffffffffffffffffff8f0fff0f0f0fff0e8e0fff0d8d0ffb04830ffd07070ff , + 0xa05050ff0000000000000000f0a8a0ffffc0c0ffe08080ffffffffffffffffff , + 0xfffffffffffffffffffffffffff8f0fff0f0f0fff0e8e0ffb05030ffe07880ff , + 0xa05050ff0000000000000000f0b0b0ffffc0c0fff08890ffffffffffffffffff , + 0xfffffffffffffffffffffffffffffffffff8f0fff0f0f0ffc05040ff603030ff , + 0xb05850ff0000000000000000f0b0b0ffffc0c0ffff9090ffffffffffffffffff , + 0xfffffffffffffffffffffffffffffffffffffffffff8f0ffc05850ffb05860ff , + 0xb05860ff0000000000000000f0b8b0fff0b8b0fff0b0b0fff0b0b0fff0a8b0ff , + 0xf0a0a0ffe098a0ffe09090ffe09090ffe08890ffe08080ffd07880ffd07870ff , + 0xd07070ff00000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000 + End + + LayoutCachedLeft =6720 + LayoutCachedTop =60 + LayoutCachedWidth =7440 + LayoutCachedHeight =420 + 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 TextBox + TabStop = NotDefault + OldBorderStyle =0 + OverlapFlags =85 + BackStyle =0 + IMESentenceMode =3 + Left =240 + Top =75 + Width =720 + Height =300 + FontSize =9 + TabIndex =4 + BorderColor =8355711 + ForeColor =255 + Name ="tbxIcon" + GridlineColor =10921638 + + LayoutCachedLeft =240 + LayoutCachedTop =75 + LayoutCachedWidth =960 + LayoutCachedHeight =375 + BorderThemeColorIndex =0 + BorderTint =50.0 + BorderShade =100.0 + ForeThemeColorIndex =-1 + ForeTint =50.0 + End + Begin CommandButton + OverlapFlags =85 + Left =5940 + Top =60 + Width =720 + TabIndex =3 + ForeColor =4210752 + Name ="btnUndo" + Caption ="Edit" + OnClick ="[Event Procedure]" + ControlTipText ="Undo/Clear values" + GridlineColor =10921638 + ImageData = Begin + 0x2800000010000000100000000100200000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000f0906060d0784080b0583010000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000e0785040f08850ffd07040ffa05830500000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000f0906020d0704060f08050ffd07050f0a050300000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x00000000000000000000000000000000c06840d0f08850ffc078508000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0xf0c0b01000000000000000000000000090482040e07840ffe08860ffe0a08000 , + 0x00000000000000000000000000000000d07040ffd07040ffc06840ffb06030ff , + 0xb05830ff905030ff0000000000000000b0603020c06840ffe08050ffd0886080 , + 0x00000000000000000000000000000000d07850ffe07030fff08050fff09870ff , + 0xe09060fff0a08040000000000000000080402000c06840ffe07840f0e09870c0 , + 0x00000000000000000000000000000000d08050ffe08050fff09060fff0a070ff , + 0x904830b0b0603040000000000000000080402000c06840ffd07040f0e09870d0 , + 0x00000000000000000000000000000000d08860ffe09060fff09870fff08850f0 , + 0xb06040ffb06040ffb060307000000000b0805020a05830f0d07840f0e09070d0 , + 0x000000000000000000000000e0b09010c08060ffd09870e0d0886090d09070ff , + 0xd08050ffc07040ffc06840ffb06030c0b07040e0a06040ffe08050ffd0a080e0 , + 0x00000000000000000000000000000000c08860ffd0a0804000000000d08860c0 , + 0xd08860ffd08050f0c06840ffb06840ffb06030f0e07840f0e0a080f0d09880e0 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0xf0a880c0e09880ffe09870f0e09070f0e09070e0e0a080f0e0a890f0f0b8a020 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x00000000f0b89060f0b090c0f0b8a0e0f0c0a0c0f0c0a090f0c0b02000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000 + End + + LayoutCachedLeft =5940 + LayoutCachedTop =60 + LayoutCachedWidth =6660 + LayoutCachedHeight =420 + 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 Subform + CanShrink = NotDefault + OverlapFlags =247 + Left =105 + Top =840 + Width =7650 + Height =4380 + TabIndex =5 + BorderColor =10921638 + Name ="list" + SourceObject ="Form.SetObserverRecorderList" + GridlineColor =10921638 + + LayoutCachedLeft =105 + LayoutCachedTop =840 + LayoutCachedWidth =7755 + LayoutCachedHeight =5220 + End + Begin Rectangle + SpecialEffect =0 + BackStyle =1 + OldBorderStyle =0 + OverlapFlags =93 + Top =720 + Width =7860 + Height =4620 + BackColor =4144959 + BorderColor =10921638 + Name ="rctList" + GridlineColor =10921638 + LayoutCachedTop =720 + LayoutCachedWidth =7860 + LayoutCachedHeight =5340 + BackThemeColorIndex =-1 + End + Begin TextBox + TabStop = NotDefault + OldBorderStyle =0 + OverlapFlags =85 + BackStyle =0 + IMESentenceMode =3 + Left =7560 + Top =105 + Width =240 + Height =300 + FontSize =9 + TabIndex =6 + BorderColor =8355711 + ForeColor =8355711 + Name ="tbxID" + ControlSource ="ID" + DefaultValue ="0" + GridlineColor =10921638 + + LayoutCachedLeft =7560 + LayoutCachedTop =105 + LayoutCachedWidth =7800 + LayoutCachedHeight =405 + BorderThemeColorIndex =0 + BorderTint =50.0 + BorderShade =100.0 + ForeTint =50.0 + End + Begin ComboBox + LimitToList = NotDefault + OverlapFlags =85 + TextAlign =2 + IMESentenceMode =3 + ColumnCount =2 + Left =1380 + Top =60 + Width =2160 + Height =315 + FontSize =8 + BackColor =65535 + BorderColor =10921638 + ForeColor =4210752 + ConditionalFormat = Begin + 0x010000009a000000020000000100000000000000000000001800000001000000 , + 0x00000000fff200000000000003000000190000001c0000000100000000000000 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x5b007400620078005300740061007200740044006100740065005d002e005600 , + 0x61006c00750065003d0022002200000000002200220000000000 + End + Name ="cbxObserver" + RowSourceType ="Table/Query" + ColumnWidths ="0;2160" + AfterUpdate ="[Event Procedure]" + ControlTipText ="Select data observer" + GridlineColor =10921638 + AllowValueListEdits =0 + + LayoutCachedLeft =1380 + LayoutCachedTop =60 + LayoutCachedWidth =3540 + LayoutCachedHeight =375 + BackThemeColorIndex =-1 + ForeThemeColorIndex =0 + ForeTint =75.0 + ForeShade =100.0 + ConditionalFormat14 = Begin + 0x01000200000001000000000000000100000000000000fff20000170000005b00 , + 0x7400620078005300740061007200740044006100740065005d002e0056006100 , + 0x6c00750065003d00220022000000000000000000000000000000000000000000 , + 0x0000000000030000000100000000000000ffffff000200000022002200000000 , + 0x000000000000000000000000000000000000 + End + End + Begin ComboBox + LimitToList = NotDefault + OverlapFlags =93 + TextAlign =2 + IMESentenceMode =3 + ColumnCount =2 + Left =3660 + Top =60 + Width =2160 + Height =315 + FontSize =8 + TabIndex =1 + BackColor =65535 + BorderColor =10921638 + ForeColor =4210752 + ConditionalFormat = Begin + 0x010000009a000000020000000100000000000000000000001800000001000000 , + 0x00000000fff200000000000003000000190000001c0000000100000000000000 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x5b007400620078005300740061007200740044006100740065005d002e005600 , + 0x61006c00750065003d0022002200000000002200220000000000 + End + Name ="cbxRecorder" + RowSourceType ="Table/Query" + ColumnWidths ="0;2160" + AfterUpdate ="[Event Procedure]" + ControlTipText ="Select data recorder" + GridlineColor =10921638 + AllowValueListEdits =0 + + LayoutCachedLeft =3660 + LayoutCachedTop =60 + LayoutCachedWidth =5820 + LayoutCachedHeight =375 + 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 =525 + 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 =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 + BorderColor =8355711 + ForeColor =6750105 + Name ="lblMsgIcon" + FontName ="Segoe UI" + GridlineColor =10921638 + LayoutCachedLeft =4320 + LayoutCachedTop =345 + LayoutCachedWidth =5145 + LayoutCachedHeight =945 + ThemeFontIndex =-1 + BackThemeColorIndex =-1 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + End + End + Begin FormFooter + Height =0 + Name ="FormFooter" + AlternateBackThemeColorIndex =1 + AlternateBackShade =95.0 + BackThemeColorIndex =1 + 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: SetObserverRecorder +' Level: Application form +' Version: 1.01 +' Basis: Dropdown form +' +' Description: Observer / recorder setting form object related properties, events, functions & procedures for UI display +' +' Source/date: Bonnie Campbell, September 8, 2016 +' References: - +' Revisions: BLC - 9/1/2016 - 1.00 - initial version +' BLC - 10/19/2017 - 1.01 - added comment length & replaced event w/ observerrecorder +' ================================= + +'--------------------- +' Simulated Inheritance +'--------------------- + +'--------------------- +' Declarations +'--------------------- +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 +'--------------------- +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 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 + Else + RaiseEvent InvalidCallingForm(Value) + End If +End Property + +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 +'--------------------- + +' --------------------------------- +' Sub: Form_Open +' Description: form opening actions +' Assumptions: OpenArgs passes only the calling form name +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 9/8/2016 - initial version +' --------------------------------- +Private Sub Form_Open(Cancel As Integer) +On Error GoTo Err_Handler + + 'default + Me.CallingForm = "Main" + + If Len(Nz(Me.OpenArgs, "")) > 0 And _ + Len(Nz(Me.OpenArgs, "")) <> Replace(Nz(Me.OpenArgs, ""), "|", "") Then + + 'set the referencing table & record + 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 + ToggleForm Me.CallingForm, -1 + + '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." + tbxIcon.Value = StringFromCodepoint(uBullet) + lblDirections.ForeColor = lngLtBlue + btnComment.Caption = StringFromCodepoint(uComment) + btnComment.ForeColor = lngBlue + + lblRecordRefID.ForeColor = lngLtLime + + 'set hover + btnComment.HoverColor = lngGreen + btnSave.HoverColor = lngGreen + btnUndo.HoverColor = lngGreen + + 'defaults + tbxIcon.ForeColor = lngRed + btnComment.Enabled = False + btnSave.Enabled = False + lblMsgIcon.Caption = "" + lblMsg.Caption = "" + + 'ID default -> value used only for edits of existing table values + tbxID.DefaultValue = 0 + + 'clear form datasource in case it was saved (to keep unbound) + Me.RecordSource = "" + + 'set data sources + Set cbxObserver.Recordset = GetRecords("s_contact_list") + Set cbxRecorder.Recordset = GetRecords("s_contact_list") + + 'set list data source + Dim Params(0 To 2) As Variant + + Params(0) = Me.RefTable + Params(1) = Me.RefID + + Set Me.list.Form.Recordset = GetRecords("s_record_action_by_refID", Params) + Me.list.Form.Requery + + 'initialize values + ClearForm Me + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - Form_Open[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: Form_Load +' Description: form loading actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 9/8/2016 - initial version +' --------------------------------- +Private Sub Form_Load() +On Error GoTo Err_Handler + + 'eliminate NULLs + If IsNull(Me.OpenArgs) Then GoTo Exit_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[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: Form_Current +' Description: form current actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, June 1, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 6/1/2016 - initial version +' --------------------------------- +Private Sub Form_Current() +On Error GoTo Err_Handler + +' If tbxID > 0 Then btnComment.Enabled = True + 'MsgBox tbxID, vbCritical, "Current" + 'If tbxID > 0 Then ReadyForSave + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - Form_Current[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: Form_BeforeUpdate +' Description: form current actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, August 22, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 8/22/2016 - initial version +' --------------------------------- +Private Sub zForm_BeforeUpdate(Cancel As Integer) +On Error GoTo Err_Handler + + If Not m_SaveOK Then + Cancel = True + End If + 'Cancel = True + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - Form_BeforeUpdate[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: cbxObserver_AfterUpdate +' Description: Dropdown after update actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 9/8/2016 - initial version +' --------------------------------- +Private Sub cbxObserver_AfterUpdate() +On Error GoTo Err_Handler + + Me.ObserverID = cbxObserver.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 & " - cbxObserver_AfterUpdate[SetObserverObserver form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: cbxRecorder_AfterUpdate +' Description: Dropdown after update actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 9/8/2016 - initial version +' --------------------------------- +Private Sub cbxRecorder_AfterUpdate() +On Error GoTo Err_Handler + + Me.RecorderID = cbxRecorder.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 & " - cbxRecorder_AfterUpdate[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnUndo_Click +' Description: Undo button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, June 1, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 6/1/2016 - initial version +' --------------------------------- +Private Sub btnUndo_Click() +On Error GoTo Err_Handler + + ClearForm Me + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnUndo_Click[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnSave_Click +' Description: Save button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 9/8/2016 - initial version +' BLC - 9/1/2016 - cleanup commented code +' --------------------------------- +Private Sub btnSave_Click() +On Error GoTo Err_Handler + + 'set enable btnSave_Click save + m_SaveOK = True + +' 'pre-save form +' Me![list].Form.Dirty = False + +' 'run for observer +' Me.RAAction = "O" +' Me.RAContactID = Me.ObserverID +' +' UpsertRecord Me +' +' 'run for recorder +' Me.RAAction = "R" +' Me.RAContactID = Me.RecorderID +' +' UpsertRecord Me + +' SetObserverRecorder Me, Me.RefTable + + 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])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnComment_Click +' Description: Undo button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, June 1, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 6/1/2016 - initial version +' BLC - 10/19/2017 - added comment length & replaced event w/ observerrecorder +' --------------------------------- +Private Sub btnComment_Click() +On Error GoTo Err_Handler + + 'open comment form + DoCmd.OpenForm "Comment", acNormal, , , , , "observerrecorder|" & tbxID & "|255" + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnComment_Click[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: Form_Close +' Description: form closing actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 9/8/2016 - initial version +' BLC - 8/2/2016 - use Me.CallingForm +' --------------------------------- +Private Sub Form_Close() +On Error GoTo Err_Handler + + 'restore calling form + ToggleForm Me.CallingForm, 0 + +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[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: ReadyForSave +' Description: Check if form values are ready to save +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, September 8, 2016 - 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() +' --------------------------------- +Public Sub ReadyForSave() +On Error GoTo Err_Handler + + Dim isOK As Boolean + + 'default + 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 + + tbxIcon.ForeColor = IIf(isOK = True, lngDkGreen, lngRed) + btnSave.Enabled = isOK + + 'refresh form +' Me.Requery + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - ReadyForSave[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: RunReadyForSave +' Description: Run ready for save check from another form (public method) +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, September 8, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 6/26/2016 - initial version +' --------------------------------- +Public Sub RunReadyForSave() +On Error GoTo Err_Handler + + ReadyForSave + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - RunReadyForSave[SetObserverRecorder form])" + End Select + Resume Exit_Handler +End Sub diff --git a/source/forms/Site.bas b/source/forms/Site.bas index 2d63b31..7ff9d9b 100644 --- a/source/forms/Site.bas +++ b/source/forms/Site.bas @@ -20,16 +20,18 @@ Begin Form Width =7860 DatasheetFontHeight =11 ItemSuffix =32 - Left =6180 - Top =2175 - Right =14040 - Bottom =12780 + Left =4065 + Top =3105 + Right =16815 + Bottom =14490 DatasheetGridlinesColor =14806254 RecSrcDt = Begin - 0x236ab60a61c3e440 + 0xd3734756f206e540 End - Caption ="Events (Sampling Visits)" + Caption ="Site" OnCurrent ="[Event Procedure]" + BeforeUpdate ="[Event Procedure]" + AfterUpdate ="[Event Procedure]" OnOpen ="[Event Procedure]" OnClose ="[Event Procedure]" DatasheetFontName ="Calibri" @@ -163,7 +165,6 @@ Begin Form BorderColor =8355711 ForeColor =16777215 Name ="lblTitle" - Caption ="Site" GridlineColor =10921638 LayoutCachedLeft =180 LayoutCachedTop =60 @@ -181,7 +182,7 @@ Begin Form BorderColor =8355711 ForeColor =16777164 Name ="lblDirections" - Caption ="directions" + Caption ="Enter site details." GridlineColor =10921638 LayoutCachedLeft =180 LayoutCachedTop =420 @@ -214,9 +215,9 @@ Begin Form Left =6660 Top =900 Width =720 - ForeColor =4210752 + ForeColor =16711680 Name ="btnComment" - Caption ="comment" + Caption ="" OnClick ="[Event Procedure]" GridlineColor =10921638 @@ -224,9 +225,11 @@ Begin Form LayoutCachedTop =900 LayoutCachedWidth =7380 LayoutCachedHeight =1260 + ForeThemeColorIndex =-1 BackColor =14136213 BorderColor =14136213 - HoverColor =15060409 + HoverColor =65280 + HoverThemeColorIndex =-1 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 @@ -244,9 +247,9 @@ Begin Form Height =315 FontWeight =600 BorderColor =8355711 - ForeColor =16777215 + ForeColor =6750105 Name ="lblContext" - Caption ="Context" + Caption ="BLCA > Gunnison > EP > B" GridlineColor =10921638 LayoutCachedLeft =3600 LayoutCachedTop =60 @@ -340,7 +343,8 @@ Begin Form LayoutCachedHeight =420 BackColor =14136213 BorderColor =14136213 - HoverColor =15060409 + HoverColor =65280 + HoverThemeColorIndex =-1 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 @@ -361,6 +365,7 @@ Begin Form BorderColor =10921638 ForeColor =4210752 Name ="tbxSiteCode" + ControlSource ="SiteCode" AfterUpdate ="[Event Procedure]" OnKeyPress ="[Event Procedure]" OnLostFocus ="[Event Procedure]" @@ -470,7 +475,8 @@ Begin Form LayoutCachedHeight =420 BackColor =14136213 BorderColor =14136213 - HoverColor =15060409 + HoverColor =65280 + HoverThemeColorIndex =-1 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 @@ -530,6 +536,8 @@ Begin Form BorderColor =8355711 ForeColor =8355711 Name ="tbxID" + ControlSource ="ID" + DefaultValue ="0" GridlineColor =10921638 LayoutCachedLeft =7560 @@ -553,6 +561,7 @@ Begin Form BorderColor =10921638 ForeColor =4210752 Name ="tbxSiteName" + ControlSource ="SiteName" AfterUpdate ="[Event Procedure]" ControlTipText ="Enter full site name" ConditionalFormat = Begin @@ -588,6 +597,7 @@ Begin Form BorderColor =10921638 ForeColor =4210752 Name ="tbxDescription" + ControlSource ="SiteDescription" ControlTipText ="Enter site description as needed." GridlineColor =10921638 @@ -626,6 +636,7 @@ Begin Form BorderColor =10921638 ForeColor =4210752 Name ="tbxSiteDirections" + ControlSource ="SiteDirections" AfterUpdate ="[Event Procedure]" ControlTipText ="Enter directions to the site." GridlineColor =10921638 @@ -669,7 +680,6 @@ Begin Form BorderColor =8355711 ForeColor =16777164 Name ="lblMsg" - Caption ="message" FontName ="Segoe UI" GridlineColor =10921638 LayoutCachedTop =4320 @@ -690,9 +700,8 @@ Begin Form FontSize =20 BackColor =4144959 BorderColor =8355711 - ForeColor =16777164 + ForeColor =16772541 Name ="lblMsgIcon" - Caption ="icon" FontName ="Segoe UI" GridlineColor =10921638 LayoutCachedLeft =4320 @@ -726,7 +735,7 @@ Option Explicit ' ================================= ' Form: Site ' Level: Application form -' Version: 1.03 +' Version: 1.04 ' Basis: Dropdown form ' ' Description: Site form object related properties, events, functions & procedures for UI display @@ -738,6 +747,8 @@ Option Explicit ' mod_App_Data Upsert/SetRecord() ' BLC - 10/20/2016 - 1.02 - adjusted to use GetContext(), added CallingForm property ' BLC - 1/31/2017 - 1.03 - added ClearForm to clear form fields after save +' BLC - 11/24/2017 - 1.04 - Save button enable only for new records, +' added before & after form update events ' ================================= '--------------------- @@ -751,6 +762,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 '--------------------- @@ -818,6 +831,7 @@ End Property ' Revisions: ' BLC - 5/31/2016 - initial version ' BLC - 10/20/2016 - revised to use CallingForm property, GetContext() +' BLC - 11/24/2017 - Save button enable only for new records ' --------------------------------- Private Sub Form_Open(Cancel As Integer) On Error GoTo Err_Handler @@ -915,12 +929,17 @@ End Sub ' Adapted: - ' Revisions: ' BLC - 6/1/2016 - initial version +' BLC - 11/24/2017 - Save button enable only for new records ' --------------------------------- Private Sub Form_Current() On Error GoTo Err_Handler - - If tbxID > 0 Then btnComment.Enabled = True + + 'default + btnSave.Enabled = False + +' If tbxID > 0 Then btnComment.Enabled = True + Exit_Handler: Exit Sub Err_Handler: @@ -932,6 +951,69 @@ Err_Handler: Resume Exit_Handler End Sub +' --------------------------------- +' Sub: Form_BeforeUpdate +' Description: form current actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, November 24, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/24/2017 - initial version +' --------------------------------- +Private Sub Form_BeforeUpdate(Cancel As Integer) +On Error GoTo Err_Handler + + If Not m_SaveOK Then + Cancel = True + End If + 'Cancel = True + + Me.lblMsg.Caption = StringFromCodepoint(uRArrow) & " Updating record..." + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - Form_BeforeUpdate[Events form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: Form_AfterUpdate +' Description: form after update actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, November 24, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/24/2017 - initial version +' --------------------------------- +Private Sub Form_AfterUpdate() +On Error GoTo Err_Handler + + Me.lblMsg.Caption = "" + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - Form_BeforeUpdate[Events form])" + End Select + Resume Exit_Handler +End Sub + ' --------------------------------- ' Sub: tbxSiteCode_KeyPress ' Description: Textbox keypress actions @@ -1243,6 +1325,7 @@ End Sub ' Revisions: ' BLC - 5/31/2016 - initial version ' BLC - 8/23/2016 - changed ReadyForSave() to public for mod_App_Data Upsert/SetRecord() +' BLC - 11/24/2017 - Save button enable only for new records ' --------------------------------- Public Sub ReadyForSave() On Error GoTo Err_Handler @@ -1260,7 +1343,9 @@ On Error GoTo Err_Handler End If tbxIcon.ForeColor = IIf(isOK = True, lngDkGreen, lngRed) - btnSave.Enabled = isOK + + 'enable save button only for new sites (tbxID = 0) + If tbxID = 0 Then btnSave.Enabled = isOK 'refresh form Me.Requery diff --git a/source/forms/SiteList.bas b/source/forms/SiteList.bas index 3a81eb9..a0fc06c 100644 --- a/source/forms/SiteList.bas +++ b/source/forms/SiteList.bas @@ -20,13 +20,14 @@ Begin Form Width =7560 DatasheetFontHeight =11 ItemSuffix =28 - Right =13155 - Bottom =11385 + Left =450 + Top =7005 + Right =7830 + Bottom =11115 DatasheetGridlinesColor =14806254 RecSrcDt = Begin - 0x69d3d7fef5d1e440 + 0xf7b14756f206e540 End - RecordSource ="Site" Caption ="_List" OnCurrent ="[Event Procedure]" OnOpen ="[Event Procedure]" @@ -289,7 +290,8 @@ Begin Form LayoutCachedHeight =420 BackColor =14136213 BorderColor =14136213 - HoverColor =15060409 + HoverColor =65280 + HoverThemeColorIndex =-1 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 @@ -349,7 +351,8 @@ Begin Form BackColor =14136213 BorderColor =14136213 ThemeFontIndex =-1 - HoverColor =15060409 + HoverColor =65280 + HoverThemeColorIndex =-1 PressedColor =9592887 HoverForeColor =4210752 PressedForeColor =4210752 diff --git a/source/forms/TemplateAdd.bas b/source/forms/TemplateAdd.bas index 15a5a51..6f533be 100644 --- a/source/forms/TemplateAdd.bas +++ b/source/forms/TemplateAdd.bas @@ -1271,7 +1271,7 @@ On Error GoTo Err_Handler lblTemplateMax.BorderStyle = 1 '0-Transparent, 1-Solid, 2-Dashes, 3-Short dashes, '4-Dots, 5-Sparse dots, 6-Dash dot, 7-Dash dot dot, '8-Double solid - lblTemplateMax.borderColor = lngRed + lblTemplateMax.BorderColor = lngRed lblTemplateMax.Caption = "Templates over 255 characters must be edited directly " _ & "in the template table after saving. " & vbCrLf _ & "Save the template, then edit the new template's " _ diff --git a/source/forms/Tile.bas b/source/forms/Tile.bas index dfc5c9a..6ae8a3b 100644 --- a/source/forms/Tile.bas +++ b/source/forms/Tile.bas @@ -1008,7 +1008,7 @@ End Property Public Property Let BarColor(Value As Variant) m_BarColor = Value - Me.lineIndicator.borderColor = m_BarColor + Me.lineIndicator.BorderColor = m_BarColor End Property Public Property Get BarColor() @@ -1017,7 +1017,7 @@ End Property Public Property Let IndicatorColor(Value As Variant) m_IndicatorColor = Value - Me.lineIndicator.borderColor = m_IndicatorColor + Me.lineIndicator.BorderColor = m_IndicatorColor End Property Public Property Get IndicatorColor() diff --git a/source/forms/Unknown.bas b/source/forms/Unknown.bas index 64242a4..de7d384 100644 --- a/source/forms/Unknown.bas +++ b/source/forms/Unknown.bas @@ -20,10 +20,10 @@ Begin Form Width =10140 DatasheetFontHeight =11 ItemSuffix =81 - Left =3825 - Top =3150 - Right =12765 - Bottom =14535 + Left =14235 + Top =3120 + Right =23175 + Bottom =14505 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x236ab60a61c3e440 @@ -365,7 +365,7 @@ Begin Form End Begin Section CanGrow = NotDefault - Height =12120 + Height =11220 Name ="Detail" AlternateBackColor =15921906 AlternateBackThemeColorIndex =1 @@ -746,7 +746,7 @@ Begin Form Left =105 Top =7620 Width =9855 - Height =4380 + Height =3480 TabIndex =22 BorderColor =10921638 Name ="list" @@ -756,7 +756,7 @@ Begin Form LayoutCachedLeft =105 LayoutCachedTop =7620 LayoutCachedWidth =9960 - LayoutCachedHeight =12000 + LayoutCachedHeight =11100 End Begin Rectangle SpecialEffect =0 @@ -765,14 +765,14 @@ Begin Form OverlapFlags =93 Top =7500 Width =10140 - Height =4620 + Height =3720 BackColor =4144959 BorderColor =10921638 Name ="rctList" GridlineColor =10921638 LayoutCachedTop =7500 LayoutCachedWidth =10140 - LayoutCachedHeight =12120 + LayoutCachedHeight =11220 BackThemeColorIndex =-1 End Begin Label diff --git a/source/forms/VegPlot.bas b/source/forms/VegPlot.bas index 7e591fe..047fd14 100644 --- a/source/forms/VegPlot.bas +++ b/source/forms/VegPlot.bas @@ -19,11 +19,11 @@ Begin Form GridY =24 Width =7860 DatasheetFontHeight =11 - ItemSuffix =95 - Left =3855 - Top =3150 - Right =12765 - Bottom =14535 + ItemSuffix =99 + Left =4440 + Top =915 + Right =12300 + Bottom =12285 DatasheetGridlinesColor =14806254 RecSrcDt = Begin 0x6efd080b49dfe440 @@ -231,6 +231,7 @@ Begin Form ForeTint =100.0 End Begin Label + Visible = NotDefault OverlapFlags =85 Left =3300 Top =1920 @@ -560,13 +561,95 @@ Begin Form End Begin Section CanGrow = NotDefault - Height =10050 + Height =9105 Name ="Detail" AlternateBackColor =15921906 AlternateBackThemeColorIndex =1 AlternateBackShade =95.0 BackThemeColorIndex =1 Begin + Begin Label + BackStyle =1 + OldBorderStyle =1 + OverlapFlags =93 + Left =180 + Top =930 + Width =5520 + Height =2760 + FontSize =14 + LeftMargin =216 + TopMargin =288 + BackColor =16051931 + Name ="lblPct" + Caption ="%" + GridlineColor =10921638 + LayoutCachedLeft =180 + LayoutCachedTop =930 + LayoutCachedWidth =5700 + LayoutCachedHeight =3690 + BackThemeColorIndex =8 + BackTint =20.0 + BorderThemeColorIndex =-1 + BorderTint =100.0 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin Label + BackStyle =1 + OldBorderStyle =1 + OverlapFlags =223 + Left =2580 + Top =2940 + Width =5100 + Height =750 + FontSize =14 + LeftMargin =72 + TopMargin =144 + BackColor =8576482 + Name ="lblSizeClass" + GridlineColor =10921638 + LayoutCachedLeft =2580 + LayoutCachedTop =2940 + LayoutCachedWidth =7680 + LayoutCachedHeight =3690 + BackThemeColorIndex =-1 + BorderThemeColorIndex =-1 + BorderTint =100.0 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin CommandButton + Enabled = NotDefault + TabStop = NotDefault + OverlapFlags =93 + Left =6300 + Top =2520 + Width =1140 + TabIndex =29 + ForeColor =4210752 + Name ="btnSubstrateCover" + Caption ="Substrates" + OnClick ="[Event Procedure]" + ControlTipText ="Add/Edit Substrate Cover" + GridlineColor =10921638 + + LayoutCachedLeft =6300 + LayoutCachedTop =2520 + LayoutCachedWidth =7440 + LayoutCachedHeight =2880 + 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 BackStyle =1 OldBorderStyle =1 @@ -630,9 +713,9 @@ Begin Form OldBorderStyle =1 OverlapFlags =93 Left =5820 - Top =1710 + Top =480 Width =1860 - Height =1740 + Height =1560 FontSize =14 LeftMargin =72 TopMargin =144 @@ -641,9 +724,9 @@ Begin Form Caption ="Cover\015\012Species" GridlineColor =10921638 LayoutCachedLeft =5820 - LayoutCachedTop =1710 + LayoutCachedTop =480 LayoutCachedWidth =7680 - LayoutCachedHeight =3450 + LayoutCachedHeight =2040 BackThemeColorIndex =6 BackTint =40.0 BorderThemeColorIndex =-1 @@ -677,38 +760,12 @@ Begin Form ForeThemeColorIndex =-1 ForeTint =100.0 End - Begin Label - BackStyle =1 - OldBorderStyle =1 - OverlapFlags =93 - Left =180 - Top =930 - Width =5520 - Height =2760 - FontSize =14 - LeftMargin =216 - TopMargin =288 - BackColor =16051931 - Name ="lblPct" - Caption ="%" - GridlineColor =10921638 - LayoutCachedLeft =180 - LayoutCachedTop =930 - LayoutCachedWidth =5700 - LayoutCachedHeight =3690 - BackThemeColorIndex =8 - BackTint =20.0 - BorderThemeColorIndex =-1 - BorderTint =100.0 - ForeThemeColorIndex =-1 - ForeTint =100.0 - End Begin CommandButton OverlapFlags =85 Left =6660 Top =60 Width =720 - TabIndex =24 + TabIndex =21 ForeColor =4210752 Name ="btnSave" Caption ="Edit" @@ -774,19 +831,19 @@ Begin Form TabStop = NotDefault OverlapFlags =215 Left =105 - Top =5550 + Top =5475 Width =7650 - Height =4380 - TabIndex =25 + Height =3510 + TabIndex =26 BorderColor =10921638 Name ="list" SourceObject ="Form.VegPlotList" GridlineColor =10921638 LayoutCachedLeft =105 - LayoutCachedTop =5550 + LayoutCachedTop =5475 LayoutCachedWidth =7755 - LayoutCachedHeight =9930 + LayoutCachedHeight =8985 End Begin CommandButton TabStop = NotDefault @@ -794,7 +851,7 @@ Begin Form Left =5820 Top =60 Width =720 - TabIndex =29 + TabIndex =30 ForeColor =4210752 Name ="btnUndo" Caption ="Edit" @@ -860,16 +917,16 @@ Begin Form BackStyle =1 OldBorderStyle =0 OverlapFlags =93 - Top =5430 + Top =5355 Width =7860 - Height =4620 + Height =3750 BackColor =4144959 BorderColor =10921638 Name ="rctList" GridlineColor =10921638 - LayoutCachedTop =5430 + LayoutCachedTop =5355 LayoutCachedWidth =7860 - LayoutCachedHeight =10050 + LayoutCachedHeight =9105 BackThemeColorIndex =-1 End Begin TextBox @@ -883,7 +940,7 @@ Begin Form Width =240 Height =300 FontSize =9 - TabIndex =26 + TabIndex =27 BorderColor =8355711 ForeColor =8355711 Name ="tbxID" @@ -976,7 +1033,7 @@ Begin Form Left =1020 Top =1890 Height =315 - TabIndex =8 + TabIndex =7 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -1014,7 +1071,7 @@ Begin Form Left =2580 Top =1890 Height =315 - TabIndex =9 + TabIndex =8 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -1052,7 +1109,7 @@ Begin Form Left =2580 Top =1260 Height =315 - TabIndex =6 + TabIndex =5 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -1091,7 +1148,7 @@ Begin Form Top =4530 Width =780 Height =315 - TabIndex =19 + TabIndex =20 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -1271,7 +1328,7 @@ Begin Form Width =720 Height =300 FontSize =9 - TabIndex =27 + TabIndex =28 BorderColor =8355711 ForeColor =690698 Name ="tbxIcon" @@ -1290,9 +1347,9 @@ Begin Form Begin CommandButton OverlapFlags =215 Left =6840 - Top =2430 + Top =1080 Width =720 - TabIndex =21 + TabIndex =23 ForeColor =4210752 Name ="btnURC" Caption ="URC" @@ -1301,9 +1358,9 @@ Begin Form GridlineColor =10921638 LayoutCachedLeft =6840 - LayoutCachedTop =2430 + LayoutCachedTop =1080 LayoutCachedWidth =7560 - LayoutCachedHeight =2790 + LayoutCachedHeight =1440 BackColor =14136213 BorderColor =14136213 HoverColor =65280 @@ -1320,9 +1377,9 @@ Begin Form Begin CommandButton OverlapFlags =215 Left =6840 - Top =1890 + Top =600 Width =720 - TabIndex =20 + TabIndex =22 ForeColor =4210752 Name ="btnWCC" Caption ="WCC" @@ -1331,9 +1388,9 @@ Begin Form GridlineColor =10921638 LayoutCachedLeft =6840 - LayoutCachedTop =1890 + LayoutCachedTop =600 LayoutCachedWidth =7560 - LayoutCachedHeight =2250 + LayoutCachedHeight =960 BackColor =14136213 BorderColor =14136213 HoverColor =65280 @@ -1351,9 +1408,9 @@ Begin Form Visible = NotDefault OverlapFlags =215 Left =6840 - Top =2970 + Top =1560 Width =720 - TabIndex =22 + TabIndex =24 ForeColor =4210752 Name ="btnARC" Caption ="ARC" @@ -1362,104 +1419,9 @@ Begin Form GridlineColor =10921638 LayoutCachedLeft =6840 - LayoutCachedTop =2970 + LayoutCachedTop =1560 LayoutCachedWidth =7560 - LayoutCachedHeight =3330 - 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 - BackStyle =1 - OldBorderStyle =1 - OverlapFlags =93 - Left =5820 - Top =3510 - Width =1860 - Height =660 - FontSize =20 - LeftMargin =72 - TopMargin =72 - BackColor =12835293 - Name ="lblTagline" - Caption ="" - ControlTipText ="Add/Edit Tagline Measurements" - GridlineColor =10921638 - LayoutCachedLeft =5820 - LayoutCachedTop =3510 - LayoutCachedWidth =7680 - LayoutCachedHeight =4170 - BackThemeColorIndex =3 - BackShade =90.0 - BorderThemeColorIndex =-1 - BorderTint =100.0 - ForeThemeColorIndex =-1 - ForeTint =100.0 - End - Begin CommandButton - Enabled = NotDefault - OverlapFlags =215 - Left =6840 - Top =3630 - Width =720 - Height =480 - TabIndex =23 - ForeColor =4210752 - Name ="btnTaglines" - Caption ="Tagline" - OnClick ="[Event Procedure]" - ControlTipText ="Add/Edit Tagline Measurements" - GridlineColor =10921638 - ImageData = Begin - 0x2800000010000000100000000100200000000000000000000000000000000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000c0a890ff604830ff604830ff604830ff604830ff00000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000c0a890fffff0e0ffffe0d0ffffe0c0ff604830ff00000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000c0a8a0fffff8f0ff000000ff000000ff604830ff00000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000c0a8a0fffff8f0fffff8f0ffffe8d0ff604830ff00000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000c0a8a0fffff8fffffff8f0ff000000ff604830ff00000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000c0a8a0fffffffffffff8fffffff0e0ff604830ff00000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000c0a8a0ffffffffff000000ff000000ff604830ff00000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000c0a8a0fffffffffffffffffff0f0f0ff604830ff00000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000c0a8a0ffffffffffffffffff000000ff604830ff00000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000c0b0a0ffffffffffffffffffffffffff604830ff00000000 , - 0x0000000000000000000000000000000000000000000000000000000000000000 , - 0x0000000000000000c0b0a0ffa08870ff806040ff705040ff604830ff604830ff , - 0x604830ff604830ff604830ff604830ff604830ff604830ff604830ff604830ff , - 0x604830ff00000000c0b0a0fffffffffff0f8f0fff0f8f0ff705040ffffffffff , - 0x000000fff0f0f0ff000000ffffe8d0ff000000ffffe0c0ff000000ffffd8c0ff , - 0x604830ff00000000c0b0a0fffffffffffffffffff0f8f0ff805840ffffffffff , - 0xffffffffffffffff000000fffff8f0fffff0e0ffffe8e0ff000000ffffd8c0ff , - 0x604830ff00000000c0b0a0ffffffffffffffffffffffffffa08070ffffffffff , - 0xfffffffffffffffffffffffffff8f0fffff8f0fffff0e0ffffe8e0ffffe8d0ff , - 0x604830ff00000000c0b0a0ffc0b0a0ffc0b0a0ffc0b0a0ffc0b0a0ffc0b0a0ff , - 0xc0a8a0ffc0a8a0ffc0a8a0ffc0a8a0ffc0a8a0ffc0a8a0ffc0a8a0ffc0a890ff , - 0xc0a890ff00000000 - End - - LayoutCachedLeft =6840 - LayoutCachedTop =3630 - LayoutCachedWidth =7560 - LayoutCachedHeight =4110 + LayoutCachedHeight =1920 BackColor =14136213 BorderColor =14136213 HoverColor =65280 @@ -1476,14 +1438,14 @@ Begin Form Begin ComboBox LimitToList = NotDefault Enabled = NotDefault - OverlapFlags =85 + OverlapFlags =223 IMESentenceMode =3 ColumnCount =6 - Left =3000 - Top =60 + Left =4380 + Top =3240 Width =2694 Height =315 - TabIndex =2 + TabIndex =15 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -1502,14 +1464,14 @@ Begin Form "ize ORDER BY Sequence; " ColumnWidths ="0;1872;576;0;0;0" AfterUpdate ="[Event Procedure]" - ControlTipText ="Size class" + ControlTipText ="Modal Sediment Size Class" GridlineColor =10921638 AllowValueListEdits =0 - LayoutCachedLeft =3000 - LayoutCachedTop =60 - LayoutCachedWidth =5694 - LayoutCachedHeight =375 + LayoutCachedLeft =4380 + LayoutCachedTop =3240 + LayoutCachedWidth =7074 + LayoutCachedHeight =3555 BackThemeColorIndex =-1 ForeThemeColorIndex =0 ForeTint =75.0 @@ -1545,7 +1507,7 @@ Begin Form BackStyle =1 OverlapFlags =223 TextAlign =3 - Top =5190 + Top =5115 Width =7860 Height =315 FontSize =9 @@ -1559,9 +1521,9 @@ Begin Form Caption ="msg" FontName ="Segoe UI" GridlineColor =10921638 - LayoutCachedTop =5190 + LayoutCachedTop =5115 LayoutCachedWidth =7860 - LayoutCachedHeight =5505 + LayoutCachedHeight =5430 ThemeFontIndex =-1 BackThemeColorIndex =-1 ForeThemeColorIndex =-1 @@ -1570,8 +1532,8 @@ Begin Form Begin Label OverlapFlags =223 TextAlign =2 - Left =4320 - Top =5010 + Left =3960 + Top =4980 Width =825 Height =600 FontSize =20 @@ -1582,73 +1544,18 @@ Begin Form Caption ="icon" FontName ="Segoe UI" GridlineColor =10921638 - LayoutCachedLeft =4320 - LayoutCachedTop =5010 - LayoutCachedWidth =5145 - LayoutCachedHeight =5610 + LayoutCachedLeft =3960 + LayoutCachedTop =4980 + LayoutCachedWidth =4785 + LayoutCachedHeight =5580 ThemeFontIndex =-1 BackThemeColorIndex =-1 ForeThemeColorIndex =-1 ForeTint =100.0 End - Begin Label - BackStyle =1 - OldBorderStyle =1 - OverlapFlags =93 - Left =5820 - Top =870 - Width =1860 - Height =780 - FontSize =14 - LeftMargin =72 - TopMargin =144 - BackColor =6074564 - Name ="lblSubstrates" - Caption ="%" - GridlineColor =10921638 - LayoutCachedLeft =5820 - LayoutCachedTop =870 - LayoutCachedWidth =7680 - LayoutCachedHeight =1650 - BackThemeColorIndex =-1 - BorderThemeColorIndex =-1 - BorderTint =100.0 - ForeThemeColorIndex =-1 - ForeTint =100.0 - End - Begin CommandButton - Enabled = NotDefault - TabStop = NotDefault - OverlapFlags =215 - Left =6300 - Top =1110 - Width =1140 - TabIndex =28 - ForeColor =4210752 - Name ="btnSubstrateCover" - Caption ="Substrates" - OnClick ="[Event Procedure]" - ControlTipText ="Add/Edit Substrate Cover" - GridlineColor =10921638 - - LayoutCachedLeft =6300 - LayoutCachedTop =1110 - LayoutCachedWidth =7440 - LayoutCachedHeight =1470 - 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 ToggleButton + Visible = NotDefault + TabStop = NotDefault OverlapFlags =215 TextFontCharSet =177 TextFontFamily =0 @@ -1656,11 +1563,11 @@ Begin Form Top =4410 Width =270 Height =300 - TabIndex =18 - Name ="tglHasSocialTrails" + TabIndex =19 + Name ="tglBeaverBrowse" AfterUpdate ="[Event Procedure]" FontName ="Calibri" - ControlTipText ="Plot has social trails" + ControlTipText ="Plot shows beaver browse activity" LeftPadding =60 RightPadding =75 BottomPadding =120 @@ -1695,6 +1602,7 @@ Begin Form Overlaps =1 Begin Begin Label + Visible = NotDefault OverlapFlags =215 Left =3540 Top =4410 @@ -1702,9 +1610,9 @@ Begin Form Height =315 BorderColor =8355711 ForeColor =8355711 - Name ="lblHasSocialTrails" - Caption ="Has Social Trails" - ControlTipText ="Plot has social trails" + Name ="lblBeaverBrowse" + Caption ="Beaver Browse" + ControlTipText ="Plot shows beaver browse activity" GridlineColor =10921638 LayoutCachedLeft =3540 LayoutCachedTop =4410 @@ -1722,7 +1630,7 @@ Begin Form Top =3990 Width =270 Height =299 - TabIndex =17 + TabIndex =18 Name ="tglNoIndicatorSpecies" AfterUpdate ="[Event Procedure]" FontName ="Calibri" @@ -1787,7 +1695,7 @@ Begin Form Top =4410 Width =270 Height =299 - TabIndex =16 + TabIndex =17 Name ="tglNoRootedVeg" AfterUpdate ="[Event Procedure]" FontName ="Calibri" @@ -1851,7 +1759,7 @@ Begin Form Top =3990 Width =270 Height =299 - TabIndex =15 + TabIndex =16 Name ="tglNoCanopyVeg" AfterUpdate ="[Event Procedure]" FontName ="Calibri" @@ -1913,7 +1821,7 @@ Begin Form Left =1020 Top =2565 Height =315 - TabIndex =11 + TabIndex =10 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -1951,7 +1859,7 @@ Begin Form Left =2580 Top =2565 Height =315 - TabIndex =12 + TabIndex =11 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -2020,10 +1928,10 @@ Begin Form Begin TextBox OverlapFlags =223 IMESentenceMode =3 - Left =2580 - Top =3240 + Left =4200 + Top =2565 Height =315 - TabIndex =14 + TabIndex =12 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -2042,10 +1950,10 @@ Begin Form End GridlineColor =10921638 - LayoutCachedLeft =2580 - LayoutCachedTop =3240 - LayoutCachedWidth =4020 - LayoutCachedHeight =3555 + LayoutCachedLeft =4200 + LayoutCachedTop =2565 + LayoutCachedWidth =5640 + LayoutCachedHeight =2880 DatasheetCaption ="Standing Dead" BackThemeColorIndex =-1 ConditionalFormat14 = Begin @@ -2062,7 +1970,7 @@ Begin Form Left =1020 Top =1260 Height =315 - TabIndex =5 + TabIndex =4 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -2113,8 +2021,8 @@ Begin Form End Begin Label OverlapFlags =215 - Left =2580 - Top =3000 + Left =4200 + Top =2325 Width =1380 Height =240 BorderColor =8355711 @@ -2124,10 +2032,10 @@ Begin Form ControlTipText ="Percent of plot woody canopy covered by standing dead (rooted/non-rotted), all s" "pecies." GridlineColor =10921638 - LayoutCachedLeft =2580 - LayoutCachedTop =3000 - LayoutCachedWidth =3960 - LayoutCachedHeight =3240 + LayoutCachedLeft =4200 + LayoutCachedTop =2325 + LayoutCachedWidth =5580 + LayoutCachedHeight =2565 End Begin CheckBox OverlapFlags =215 @@ -2135,7 +2043,7 @@ Begin Form Top =570 Width =300 Height =300 - TabIndex =3 + TabIndex =2 BorderColor =10921638 Name ="chkCalibrationPlot" DefaultValue ="0" @@ -2172,7 +2080,7 @@ Begin Form Top =570 Width =300 Height =300 - TabIndex =4 + TabIndex =3 BorderColor =10921638 Name ="chkReplicatePlot" DefaultValue ="0" @@ -2209,7 +2117,7 @@ Begin Form Left =4200 Top =1260 Height =315 - TabIndex =7 + TabIndex =6 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -2259,10 +2167,10 @@ Begin Form Begin TextBox OverlapFlags =223 IMESentenceMode =3 - Left =4200 - Top =1890 + Left =2640 + Top =3240 Height =315 - TabIndex =10 + TabIndex =14 BackColor =65535 BorderColor =10921638 ForeColor =4210752 @@ -2279,10 +2187,10 @@ Begin Form End GridlineColor =10921638 - LayoutCachedLeft =4200 - LayoutCachedTop =1890 - LayoutCachedWidth =5640 - LayoutCachedHeight =2205 + LayoutCachedLeft =2640 + LayoutCachedTop =3240 + LayoutCachedWidth =4080 + LayoutCachedHeight =3555 BackThemeColorIndex =-1 ConditionalFormat14 = Begin 0x01000200000001000000000000000100000000000000fff200001a0000005b00 , @@ -2294,8 +2202,8 @@ Begin Form End Begin Label OverlapFlags =215 - Left =4200 - Top =1650 + Left =2640 + Top =3000 Width =1020 Height =240 BorderColor =8355711 @@ -2304,10 +2212,194 @@ Begin Form Caption ="Total MSS" ControlTipText ="Total percent modal sediment cover (MSS) for the plot" GridlineColor =10921638 + LayoutCachedLeft =2640 + LayoutCachedTop =3000 + LayoutCachedWidth =3660 + LayoutCachedHeight =3240 + End + Begin Label + OverlapFlags =223 + Left =4200 + Top =1650 + Width =1155 + Height =315 + BorderColor =8355711 + ForeColor =8355711 + Name ="lblPctSocialTrails" + Caption ="Social Trails" + ControlTipText ="Total percent social trail cover for the plot" + GridlineColor =10921638 LayoutCachedLeft =4200 LayoutCachedTop =1650 - LayoutCachedWidth =5220 - LayoutCachedHeight =1890 + LayoutCachedWidth =5355 + LayoutCachedHeight =1965 + End + Begin Label + BackStyle =1 + OldBorderStyle =1 + OverlapFlags =223 + Left =5820 + Top =2100 + Width =1860 + Height =660 + FontSize =20 + LeftMargin =72 + TopMargin =72 + BackColor =12835293 + Name ="lblTagline" + Caption ="" + ControlTipText ="Add/Edit Tagline Measurements" + GridlineColor =10921638 + LayoutCachedLeft =5820 + LayoutCachedTop =2100 + LayoutCachedWidth =7680 + LayoutCachedHeight =2760 + BackThemeColorIndex =3 + BackShade =90.0 + BorderThemeColorIndex =-1 + BorderTint =100.0 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin CommandButton + Enabled = NotDefault + OverlapFlags =215 + Left =6840 + Top =2220 + Width =720 + Height =480 + TabIndex =25 + ForeColor =4210752 + Name ="btnTaglines" + Caption ="Tagline" + OnClick ="[Event Procedure]" + ControlTipText ="Add/Edit Tagline Measurements" + GridlineColor =10921638 + ImageData = Begin + 0x2800000010000000100000000100200000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000c0a890ff604830ff604830ff604830ff604830ff00000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000c0a890fffff0e0ffffe0d0ffffe0c0ff604830ff00000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000c0a8a0fffff8f0ff000000ff000000ff604830ff00000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000c0a8a0fffff8f0fffff8f0ffffe8d0ff604830ff00000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000c0a8a0fffff8fffffff8f0ff000000ff604830ff00000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000c0a8a0fffffffffffff8fffffff0e0ff604830ff00000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000c0a8a0ffffffffff000000ff000000ff604830ff00000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000c0a8a0fffffffffffffffffff0f0f0ff604830ff00000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000c0a8a0ffffffffffffffffff000000ff604830ff00000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000c0b0a0ffffffffffffffffffffffffff604830ff00000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000c0b0a0ffa08870ff806040ff705040ff604830ff604830ff , + 0x604830ff604830ff604830ff604830ff604830ff604830ff604830ff604830ff , + 0x604830ff00000000c0b0a0fffffffffff0f8f0fff0f8f0ff705040ffffffffff , + 0x000000fff0f0f0ff000000ffffe8d0ff000000ffffe0c0ff000000ffffd8c0ff , + 0x604830ff00000000c0b0a0fffffffffffffffffff0f8f0ff805840ffffffffff , + 0xffffffffffffffff000000fffff8f0fffff0e0ffffe8e0ff000000ffffd8c0ff , + 0x604830ff00000000c0b0a0ffffffffffffffffffffffffffa08070ffffffffff , + 0xfffffffffffffffffffffffffff8f0fffff8f0fffff0e0ffffe8e0ffffe8d0ff , + 0x604830ff00000000c0b0a0ffc0b0a0ffc0b0a0ffc0b0a0ffc0b0a0ffc0b0a0ff , + 0xc0a8a0ffc0a8a0ffc0a8a0ffc0a8a0ffc0a8a0ffc0a8a0ffc0a8a0ffc0a890ff , + 0xc0a890ff00000000 + End + + LayoutCachedLeft =6840 + LayoutCachedTop =2220 + LayoutCachedWidth =7560 + LayoutCachedHeight =2700 + 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 TextBox + OverlapFlags =215 + IMESentenceMode =3 + Left =4200 + Top =1890 + Height =315 + TabIndex =9 + BackColor =65535 + BorderColor =10921638 + ForeColor =4210752 + Name ="tbxPctSocialTrails" + ValidationRule ="Is Null Or \"T\" Or Between 0 And 101" + ValidationText ="Values may be whole percentages (0-100), 0.5, or T" + AfterUpdate ="[Event Procedure]" + ControlTipText ="Total percent social trail cover for the plot" + ConditionalFormat = Begin + 0x01000000a0000000020000000100000000000000000000001b00000001000000 , + 0x00000000fff2000000000000030000001c0000001f0000000100000000000000 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x5b007400620078004d006f00640061006c00530065006400530069007a006500 , + 0x5d002e00560061006c00750065003d0022002200000000002200220000000000 + End + GridlineColor =10921638 + + LayoutCachedLeft =4200 + LayoutCachedTop =1890 + LayoutCachedWidth =5640 + LayoutCachedHeight =2205 + BackThemeColorIndex =-1 + ConditionalFormat14 = Begin + 0x01000200000001000000000000000100000000000000fff200001a0000005b00 , + 0x7400620078004d006f00640061006c00530065006400530069007a0065005d00 , + 0x2e00560061006c00750065003d00220022000000000000000000000000000000 , + 0x0000000000000000000000030000000100000000000000ffffff000200000022 , + 0x002200000000000000000000000000000000000000000000 + End + End + Begin Label + OverlapFlags =247 + Left =4380 + Top =3000 + Width =2895 + Height =315 + BorderColor =8355711 + ForeColor =8355711 + Name ="lblModalSedimentSize" + Caption ="Modal Sediment Size (Overall)" + ControlTipText ="Modal Sediment Size Class" + GridlineColor =10921638 + LayoutCachedLeft =4380 + LayoutCachedTop =3000 + LayoutCachedWidth =7275 + LayoutCachedHeight =3315 + End + Begin Label + OverlapFlags =85 + Left =2880 + Width =2040 + Height =420 + FontSize =8 + BorderColor =8355711 + ForeColor =16711680 + Name ="lblHintPlotNumDist" + Caption ="Calibration/Replicate Plot? Set > 900" + ControlTipText ="Set plot number or distance > 900 if this is a calibration or replicate plot" + GridlineColor =10921638 + LayoutCachedLeft =2880 + LayoutCachedWidth =4920 + LayoutCachedHeight =420 + ForeThemeColorIndex =-1 + ForeTint =100.0 End End End @@ -2331,7 +2423,7 @@ Option Explicit ' ================================= ' Form: VegPlot ' Level: Application form -' Version: 1.13 +' Version: 1.15 ' Basis: Dropdown form ' ' Description: Vegplot form object related properties, functions & procedures for UI display @@ -2360,6 +2452,8 @@ Option Explicit ' 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() +' BLC - 11/26/2017 - 1.14 - updated PctFines validation, added PctSocialTrails +' BLC - 12/5/2017 - 1.15 - add VegPlot BeaverBrowse ' ================================= '--------------------- @@ -2443,11 +2537,11 @@ End Property ' Transect - BLCA & CANY ' Plot # - DINO only ' Plot Distance - BLCA & CANY -' Plot Density - BLCA & CANY +' Plot Density - BLCA & CANY << BLCA only ' No Canopy Veg - BLCA & CANY ' No Indicator Species - BLCA only ' No Rooted Veg - DINO & CANY -' Has Social Trail - BLCA only +' Has Social Trail - BLCA only << replaced by PctSocialTrails ' Taglines - BLCA ' ' Parameters: - @@ -2465,6 +2559,8 @@ End Property ' BLC - 1/11/2017 - changed event & transect to display based on site/feature set ' BLC - 11/1/2017 - added chkCalibration, chkReplicate, tbxPctMSS, & updated park settings/documentation ' BLC - 11/10/2017 - updated park specific controls +' BLC - 11/26/2017 - updated PctFines validation, added PctSocialTrails +' BLC - 12/5/2017 - added BeaverBrowse ' --------------------------------- Private Sub Form_Open(Cancel As Integer) On Error GoTo Err_Handler @@ -2495,12 +2591,19 @@ On Error GoTo Err_Handler lblPlotDensityBgd.Caption = StringFromCodepoint(uBrailleDots267) btnSetObserverRecorder.Caption = StringFromCodepoint(uUsers) btnSetObserverRecorder.ControlTipText = "Set the selected veg plot's observer & recorder" + lblSizeClass.Caption = "" 'disable Sediment Cover section << MSS % cover handled in VegPlot (for now) - lblSubstrates.Visible = False + 'lblSubstrates.Visible = False btnSubstrateCover.Visible = False + 'hide original size class label + lblModalSedSize.Visible = False 'hints + lblHintPlotNumDist.Caption = "Calibration/Replicate Plot? Set plot #/distance > 900" + lblHintPlotNumDist.ForeColor = lngBlue + lblHintPlotNumDist.ControlTipText = "Set plot number or distance > 900 if this is a calibration or replicate plot" + lblHintPlotNumDist.Visible = False lblHintPct.Caption = "Nearest 1% or T" lblHintPct.ForeColor = lngBlue @@ -2508,7 +2611,7 @@ On Error GoTo Err_Handler Dim strPctValidation As String, strValidationText As String strPctValidation = "Is Null Or ""T"" Or Between 0 and 101" tbxPctURC.ValidationRule = strPctValidation - tbxPctFines.ValidationRule = "Not Like ""[0-9]*.[0-9]*""" + tbxPctFines.ValidationRule = strPctValidation '"Not Like ""[0-9]*.[0-9]*""" tbxPctWater.ValidationRule = strPctValidation tbxPctFA.ValidationRule = strPctValidation tbxPctLitter.ValidationRule = strPctValidation @@ -2517,6 +2620,7 @@ On Error GoTo Err_Handler tbxPctStandingDead.ValidationRule = strPctValidation tbxPctARC.ValidationRule = strPctValidation tbxPctMSS.ValidationRule = strPctValidation + tbxPctSocialTrails.ValidationRule = strPctValidation strValidationText = "Values may be whole percentages (0-100), 0.5, or T" tbxPctURC.ValidationText = strValidationText @@ -2529,6 +2633,7 @@ On Error GoTo Err_Handler tbxPctStandingDead.ValidationText = strValidationText tbxPctARC.ValidationText = strValidationText tbxPctMSS.ValidationText = strValidationText + tbxPctSocialTrails.ValidationText = strValidationText 'set hover btnSetObserverRecorder.HoverColor = lngGreen @@ -2543,7 +2648,8 @@ On Error GoTo Err_Handler tglNoCanopyVeg.HoverColor = lngGreen tglNoRootedVeg.HoverColor = lngGreen tglNoIndicatorSpecies.HoverColor = lngGreen - tglHasSocialTrails.HoverColor = lngGreen + 'tglHasSocialTrails.HoverColor = lngGreen 'replaced by tbxPctSocialTrails + tglBeaverBrowse.HoverColor = lngGreen 'defaults tbxIcon.ForeColor = lngRed @@ -2631,7 +2737,7 @@ On Error GoTo Err_Handler 'defaults --> always on items '% sand & finer, water, litter, woody debris, modal sediment cover, - '% standing dead, filamentous algae + '% standing dead, filamentous algae, beaver browse 'defaults --> turn off items lblTransect.Visible = False @@ -2652,8 +2758,10 @@ On Error GoTo Err_Handler lblNoIndicatorSpecies.Visible = False tglNoRootedVeg.Visible = False lblNoRootedVeg.Visible = False - tglHasSocialTrails.Visible = False - lblHasSocialTrails.Visible = False + 'tglHasSocialTrails.Visible = False 'replaced by tbxPctSocialTrails + 'lblHasSocialTrails.Visible = False 'replaced by lblPctSocialTrails + tbxPctSocialTrails.Visible = False + lblPctSocialTrails.Visible = False btnAddTransect.Visible = False btnWCC.Visible = False btnURC.Visible = False @@ -2688,8 +2796,10 @@ On Error GoTo Err_Handler lblNoCanopyVeg.Visible = True tglNoIndicatorSpecies.Visible = True lblNoIndicatorSpecies.Visible = True - tglHasSocialTrails.Visible = True - lblHasSocialTrails.Visible = True +' tglHasSocialTrails.Visible = True +' lblHasSocialTrails.Visible = True + tbxPctSocialTrails.Visible = True + lblPctSocialTrails.Visible = True btnAddTransect.Visible = True btnWCC.Visible = True btnURC.Visible = True @@ -2705,10 +2815,10 @@ On Error GoTo Err_Handler tbxPctARC.Visible = True lblDistance.Visible = True tbxDistance.Visible = True - lblPlotDensity.Visible = True - lblFraction.Visible = True - tbxPlotDensity.Visible = True - lblPlotDensityBgd.Visible = True + 'lblPlotDensity.Visible = True + 'lblFraction.Visible = True + 'tbxPlotDensity.Visible = True + 'lblPlotDensityBgd.Visible = True tglNoCanopyVeg.Visible = True lblNoCanopyVeg.Visible = True tglNoRootedVeg.Visible = True @@ -3180,6 +3290,36 @@ Err_Handler: Resume Exit_Handler End Sub +' --------------------------------- +' Sub: tbxPctSocialTrails_AfterUpdate +' Description: Textbox after update actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, June 27, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 6/27/2016 - initial version +' --------------------------------- +Private Sub tbxPctSocialTrails_AfterUpdate() +On Error GoTo Err_Handler + + If Len(tbxPctSocialTrails.Text) > 0 Then _ + ReadyForSave + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - tbxPctSocialTrails_AfterUpdate[VegPlot form])" + End Select + Resume Exit_Handler +End Sub + ' --------------------------------- ' Sub: tbxPlotDensity_AfterUpdate ' Description: Textbox after update actions @@ -3310,33 +3450,25 @@ Err_Handler: End Sub ' --------------------------------- -' Sub: tglHasSocialTrails_AfterUpdate +' Sub: tglBeaverBrowse_AfterUpdate ' Description: Toggle after update actions ' Assumptions: - ' Parameters: - ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, June 27, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, December 5, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 6/27/2016 - initial version -' BLC - 1/11/2017 - revised to toggle w/ text change +' BLC - 12/5/2017 - initial version ' --------------------------------- -Private Sub tglHasSocialTrails_AfterUpdate() +Private Sub tglBeaverBrowse_AfterUpdate() On Error GoTo Err_Handler - -' If tglHasSocialTrails Then -' tglHasSocialTrails.Caption = StringFromCodepoint(uCheck) -' ReadyForSave -' Else -' tglHasSocialTrails.Caption = "" -' End If 'display as checkbox - ToggleCaption tglHasSocialTrails, True + ToggleCaption tglBeaverBrowse, True - If tglHasSocialTrails Then _ + If tglBeaverBrowse Then _ ReadyForSave Exit_Handler: @@ -3345,13 +3477,54 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - tglHasSocialTrails_AfterUpdate[VegPlot form])" + "Error encountered (#" & Err.Number & " - tglBeaverBrowse_AfterUpdate[VegPlot form])" End Select Resume Exit_Handler End Sub +'' --------------------------------- +'' Sub: tglHasSocialTrails_AfterUpdate +'' Description: Toggle after update actions +'' Assumptions: - +'' Parameters: - +'' Returns: - +'' Throws: none +'' References: - +'' Source/date: Bonnie Campbell, June 27, 2016 - for NCPN tools +'' Adapted: - +'' Revisions: +'' BLC - 6/27/2016 - initial version +'' BLC - 1/11/2017 - revised to toggle w/ text change +'' --------------------------------- +'Private Sub tglHasSocialTrails_AfterUpdate() +'On Error GoTo Err_Handler +' +'' If tglHasSocialTrails Then +'' tglHasSocialTrails.Caption = StringFromCodepoint(uCheck) +'' ReadyForSave +'' Else +'' tglHasSocialTrails.Caption = "" +'' End If +' +' 'display as checkbox +' ToggleCaption tglHasSocialTrails, True +' +' If tglHasSocialTrails Then _ +' ReadyForSave +' +'Exit_Handler: +' Exit Sub +'Err_Handler: +' Select Case Err.Number +' Case Else +' MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ +' "Error encountered (#" & Err.Number & " - tglHasSocialTrails_AfterUpdate[VegPlot form])" +' End Select +' Resume Exit_Handler +'End Sub + ' --------------------------------- -' Sub: chkCalibrate_Click +' Sub: chkCalibrationPlot_Click ' Description: Checkbox click actions ' Assumptions: - ' Parameters: - @@ -3362,10 +3535,17 @@ End Sub ' Adapted: - ' Revisions: ' BLC - 11/1/2017 - initial version +' BLC - 11/26/2017 - display plot # hint when calibration/replicate ' --------------------------------- -Private Sub chkCalibrate_Click() +Private Sub chkCalibrationPlot_Click() On Error GoTo Err_Handler + 'default + lblHintPlotNumDist.Visible = False + + 'unhide hint if calibration/replicate plot + If chkCalibrationPlot Or chkReplicatePlot Then lblHintPlotNumDist.Visible = True + ReadyForSave Exit_Handler: @@ -3374,13 +3554,13 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - chkCalibrate_Click[VegPlot form])" + "Error encountered (#" & Err.Number & " - chkCalibrationPlot_Click[VegPlot form])" End Select Resume Exit_Handler End Sub ' --------------------------------- -' Sub: chkReplicate_Click +' Sub: chkReplicatePlot_Click ' Description: Checkbox click actions ' Assumptions: - ' Parameters: - @@ -3391,10 +3571,17 @@ End Sub ' Adapted: - ' Revisions: ' BLC - 11/1/2017 - initial version +' BLC - 11/26/2017 - display plot # hint when calibration/replicate ' --------------------------------- -Private Sub chkReplicate_Click() +Private Sub chkReplicatePlot_Click() On Error GoTo Err_Handler + 'default + lblHintPlotNumDist.Visible = False + + 'unhide hint if calibration/replicate plot + If chkCalibrationPlot Or chkReplicatePlot Then lblHintPlotNumDist.Visible = True + ReadyForSave Exit_Handler: @@ -3403,7 +3590,7 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - chkReplicate_Click[VegPlot form])" + "Error encountered (#" & Err.Number & " - chkReplicatePlot_Click[VegPlot form])" End Select Resume Exit_Handler End Sub @@ -3458,6 +3645,8 @@ End Sub ' BLC - 9/27/2017 - update to use Factory.NewClassXX() vs GetClass() ' BLC - 11/10/2017 - update to handle unset values using Ne() ' BLC - 11/11/2017 - update percent values +' BLC - 11/26/2017 - replaced HasSocialTrails w/ PctSocialTrails +' BLC - 12/5/2017 - add BeaverBrowse, Calibration & Replicate Plots ' --------------------------------- Private Sub btnSave_Click() On Error GoTo Err_Handler @@ -3468,6 +3657,12 @@ On Error GoTo Err_Handler 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 @@ -3481,6 +3676,7 @@ On Error GoTo Err_Handler .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) @@ -3491,8 +3687,12 @@ On Error GoTo Err_Handler .NoCanopyVeg = IIf(tglNoCanopyVeg = -1, 1, 0) .NoRootedVeg = IIf(tglNoRootedVeg = -1, 1, 0) .NoIndicatorSpecies = IIf(tglNoIndicatorSpecies = -1, 1, 0) - .HasSocialTrails = IIf(tglHasSocialTrails = -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 @@ -3509,10 +3709,10 @@ On Error GoTo Err_Handler If tbxID.Value > 0 Then 'highlight SetObserverRecorder button - btnSetObserverRecorder.borderColor = lngRed + btnSetObserverRecorder.BorderColor = lngYellow lblMsg.ForeColor = lngYellow lblMsgIcon.Caption = StringFromCodepoint(uDoubleTriangleBlkR) - lblMsg.Caption = "Don't forget to set observer & recorder!" + lblMsg.Caption = "Don't forget to set observer && recorder!" 'enable buttons btnSubstrateCover.Enabled = True @@ -3554,8 +3754,7 @@ Private Sub btnSubstrateCover_Click() On Error GoTo Err_Handler 'open substrate cover form - DoCmd.OpenForm "SubstrateCover", acNormal, , , , , "VegPlot|" & tbxID.Text _ - & "|" & Me.cbxEvent.Column(1) + DoCmd.OpenForm "SubstrateCover", acNormal, , , , , "VegPlot|" & tbxID.Text Exit_Handler: Exit Sub @@ -3584,8 +3783,8 @@ End Sub Private Sub btnSetObserverRecorder_Click() On Error GoTo Err_Handler - DoCmd.OpenForm "SetObserverRecorder", acNormal, , , , , "VegPlot|" & Me.tbxID - + DoCmd.OpenForm "SetObserverRecorder", acNormal, , , , , "VegPlot|" & Me.tbxID & "|" & Me.cbxEvent.Column(1) 'Column 1 = event date + Exit_Handler: Exit Sub Err_Handler: @@ -3639,12 +3838,13 @@ End Sub ' Adapted: - ' Revisions: ' BLC - 6/1/2016 - initial version +' BLC - 11/26/2017 - revised to call VegSpecies vs VegWalk ' --------------------------------- Private Sub btnWCC_Click() On Error GoTo Err_Handler 'open form - DoCmd.OpenForm "VegWalk", acNormal, , , , , "WoodyCanopySpecies|" & tbxID + DoCmd.OpenForm "VegSpecies", acNormal, , , , , "WoodyCanopySpecies|" & tbxID Exit_Handler: Exit Sub @@ -3669,12 +3869,13 @@ End Sub ' Adapted: - ' Revisions: ' BLC - 6/1/2016 - initial version +' BLC - 11/26/2017 - revised to call VegSpecies vs VegWalk ' --------------------------------- Private Sub btnURC_Click() On Error GoTo Err_Handler 'open form - DoCmd.OpenForm "VegWalk", acNormal, , , , , "UnderstoryRootedSpecies|" & tbxID + DoCmd.OpenForm "VegSpecies", acNormal, , , , , "UnderstoryRootedSpecies|" & tbxID Exit_Handler: Exit Sub @@ -3699,12 +3900,13 @@ End Sub ' Adapted: - ' Revisions: ' BLC - 6/1/2016 - initial version +' BLC - 11/26/2017 - revised to call VegSpecies vs VegWalk ' --------------------------------- Private Sub btnARC_Click() On Error GoTo Err_Handler 'open form - DoCmd.OpenForm "VegWalk", acNormal, , , , , "AllRootedSpecies|" & tbxID + DoCmd.OpenForm "VegSpecies", acNormal, , , , , "AllRootedSpecies|" & tbxID Exit_Handler: Exit Sub @@ -3908,7 +4110,8 @@ On Error GoTo Err_Handler End If tbxIcon.ForeColor = IIf(isOK = True, lngDkGreen, lngRed) - btnSave.Enabled = isOK + 'enable save button only for new sites (tbxID = 0) + If tbxID = 0 Then btnSave.Enabled = isOK btnSubstrateCover.Enabled = IIf(tbxID.Value > 0, True, False) btnSetObserverRecorder.Enabled = IIf(tbxID.Value > 0, True, False) diff --git a/source/forms/VegSpecies.bas b/source/forms/VegSpecies.bas new file mode 100644 index 0000000..fe46137 --- /dev/null +++ b/source/forms/VegSpecies.bas @@ -0,0 +1,1681 @@ +Version =20 +VersionRequired =20 +Begin Form + AllowFilters = NotDefault + PopUp = NotDefault + RecordSelectors = NotDefault + AutoCenter = NotDefault + NavigationButtons = NotDefault + AllowDeletions = NotDefault + DividingLines = NotDefault + AllowAdditions = NotDefault + DefaultView =0 + ScrollBars =0 + ViewsAllowed =1 + BorderStyle =1 + PictureAlignment =2 + DatasheetGridlinesBehavior =3 + GridX =24 + GridY =24 + Width =7860 + DatasheetFontHeight =11 + ItemSuffix =75 + Left =4065 + Top =3105 + Right =13005 + Bottom =14490 + DatasheetGridlinesColor =14806254 + RecSrcDt = Begin + 0x085b3b632f07e540 + End + Caption ="VegSpecies" + OnCurrent ="[Event Procedure]" + OnOpen ="[Event Procedure]" + OnClose ="[Event Procedure]" + DatasheetFontName ="Calibri" + PrtMip = Begin + 0x6801000068010000680100006801000000000000201c0000e010000001000000 , + 0x010000006801000000000000a10700000100000001000000 + End + OnLoad ="[Event Procedure]" + AllowDatasheetView =0 + AllowPivotTableView =0 + AllowPivotChartView =0 + AllowPivotChartView =0 + FilterOnLoad =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 CommandButton + FontSize =11 + FontWeight =400 + FontName ="Calibri" + ForeThemeColorIndex =0 + ForeTint =75.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + UseTheme =1 + Shape =1 + Gradient =12 + BackThemeColorIndex =4 + BackTint =60.0 + BorderLineStyle =0 + BorderColor =16777215 + BorderThemeColorIndex =4 + BorderTint =60.0 + ThemeFontIndex =1 + HoverThemeColorIndex =4 + HoverTint =40.0 + PressedThemeColorIndex =4 + PressedShade =75.0 + HoverForeThemeColorIndex =0 + HoverForeTint =75.0 + PressedForeThemeColorIndex =0 + PressedForeTint =75.0 + End + Begin CheckBox + BorderLineStyle =0 + LabelX =230 + LabelY =-30 + BorderThemeColorIndex =1 + BorderShade =65.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + End + Begin TextBox + AddColon = NotDefault + FELineBreak = NotDefault + BorderLineStyle =0 + LabelX =-1800 + FontSize =11 + FontName ="Calibri" + AsianLineBreak =1 + BackThemeColorIndex =1 + BorderThemeColorIndex =1 + BorderShade =65.0 + ThemeFontIndex =1 + ForeThemeColorIndex =0 + ForeTint =75.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + End + Begin ComboBox + AddColon = NotDefault + BorderLineStyle =0 + LabelX =-1800 + FontSize =11 + FontName ="Calibri" + AllowValueListEdits =1 + InheritValueList =1 + ThemeFontIndex =1 + BackThemeColorIndex =1 + BorderThemeColorIndex =1 + BorderShade =65.0 + ForeThemeColorIndex =2 + ForeShade =50.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + End + Begin Subform + BorderLineStyle =0 + BorderThemeColorIndex =1 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + BorderShade =65.0 + ShowPageHeaderAndPageFooter =1 + End + Begin FormHeader + CanGrow = NotDefault + Height =1980 + BackColor =4144959 + Name ="FormHeader" + AlternateBackThemeColorIndex =1 + AlternateBackShade =95.0 + Begin + Begin Label + OverlapFlags =93 + Left =180 + Top =60 + Width =3480 + Height =300 + BorderColor =8355711 + ForeColor =16777215 + Name ="lblTitle" + GridlineColor =10921638 + LayoutCachedLeft =180 + LayoutCachedTop =60 + LayoutCachedWidth =3660 + LayoutCachedHeight =360 + ForeThemeColorIndex =1 + ForeTint =100.0 + End + Begin Label + OverlapFlags =85 + Left =180 + Top =420 + Width =6840 + Height =315 + BorderColor =8355711 + ForeColor =16777164 + Name ="lblDirections" + Caption ="Enter species found and click save." + GridlineColor =10921638 + LayoutCachedLeft =180 + LayoutCachedTop =420 + LayoutCachedWidth =7020 + LayoutCachedHeight =735 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin Label + OverlapFlags =85 + Left =1080 + Top =1620 + Width =2025 + Height =315 + FontWeight =500 + BorderColor =8355711 + ForeColor =16777215 + Name ="lblSpecies" + Caption ="Species Found" + GridlineColor =10921638 + LayoutCachedLeft =1080 + LayoutCachedTop =1620 + LayoutCachedWidth =3105 + LayoutCachedHeight =1935 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin CommandButton + Enabled = NotDefault + OverlapFlags =85 + Left =7020 + Top =1020 + Width =720 + TabIndex =1 + ForeColor =16711680 + Name ="btnComment" + Caption ="" + OnClick ="[Event Procedure]" + GridlineColor =10921638 + + LayoutCachedLeft =7020 + LayoutCachedTop =1020 + LayoutCachedWidth =7740 + LayoutCachedHeight =1380 + 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 =85 + Left =180 + Top =1020 + Width =600 + Height =315 + FontWeight =500 + BorderColor =8355711 + ForeColor =16777215 + Name ="lblEvent" + Caption ="Event" + GridlineColor =10921638 + LayoutCachedLeft =180 + LayoutCachedTop =1020 + LayoutCachedWidth =780 + LayoutCachedHeight =1335 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin Label + OverlapFlags =215 + TextAlign =3 + Left =3600 + Top =60 + Width =4140 + Height =315 + FontWeight =600 + BorderColor =8355711 + ForeColor =6750105 + Name ="lblContext" + Caption ="context" + GridlineColor =10921638 + LayoutCachedLeft =3600 + LayoutCachedTop =60 + LayoutCachedWidth =7740 + LayoutCachedHeight =375 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin CommandButton + OverlapFlags =85 + Left =3480 + Top =1560 + Width =1800 + TabIndex =3 + ForeColor =16711680 + Name ="btnAddUnknown" + Caption ="? Add Unknown" + OnClick ="[Event Procedure]" + ControlTipText ="Add a new unknown species" + GridlineColor =10921638 + + LayoutCachedLeft =3480 + LayoutCachedTop =1560 + LayoutCachedWidth =5280 + LayoutCachedHeight =1920 + 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 + Begin ComboBox + LimitToList = NotDefault + OverlapFlags =85 + IMESentenceMode =3 + ColumnCount =5 + Left =900 + Top =1020 + Width =3414 + Height =315 + ColumnOrder =0 + BackColor =65535 + BorderColor =10921638 + ForeColor =4210752 + ConditionalFormat = Begin + 0x01000000a0000000020000000100000000000000000000001b00000001000000 , + 0x00000000fff2000000000000030000001c0000001f0000000100000000000000 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x5b007400620078004d006f00640061006c00530065006400530069007a006500 , + 0x5d002e00560061006c00750065003d0022002200000000002200220000000000 + End + Name ="cbxEvent" + RowSourceType ="Table/Query" + ColumnWidths ="0;0;0;0;2" + AfterUpdate ="[Event Procedure]" + ControlTipText ="Event (sample visit)" + GridlineColor =10921638 + AllowValueListEdits =0 + + LayoutCachedLeft =900 + LayoutCachedTop =1020 + LayoutCachedWidth =4314 + LayoutCachedHeight =1335 + BackThemeColorIndex =-1 + ForeThemeColorIndex =0 + ForeTint =75.0 + ForeShade =100.0 + ConditionalFormat14 = Begin + 0x01000200000001000000000000000100000000000000fff200001a0000005b00 , + 0x7400620078004d006f00640061006c00530065006400530069007a0065005d00 , + 0x2e00560061006c00750065003d00220022000000000000000000000000000000 , + 0x0000000000000000000000030000000100000000000000ffffff000200000022 , + 0x002200000000000000000000000000000000000000000000 + End + End + Begin CommandButton + OverlapFlags =85 + Left =5400 + Top =1560 + Width =1800 + TabIndex =4 + ForeColor =16711680 + Name ="btnSpeciesSearch" + Caption =" Species" + OnClick ="[Event Procedure]" + ControlTipText ="Lookup species name" + GridlineColor =10921638 + + LayoutCachedLeft =5400 + LayoutCachedTop =1560 + LayoutCachedWidth =7200 + LayoutCachedHeight =1920 + 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 + Begin CommandButton + OverlapFlags =85 + Left =4440 + Top =1020 + TabIndex =2 + ForeColor =16711680 + Name ="btnAddEvent" + Caption =" Add Event" + OnClick ="[Event Procedure]" + ControlTipText ="Add a new event/sampling visit" + GridlineColor =10921638 + + LayoutCachedLeft =4440 + LayoutCachedTop =1020 + LayoutCachedWidth =5880 + LayoutCachedHeight =1380 + 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 + Begin CommandButton + OverlapFlags =85 + Left =6240 + Top =1020 + Width =720 + TabIndex =5 + ForeColor =4210752 + Name ="btnSetObserverRecorder" + Caption ="" + OnClick ="[Event Procedure]" + GridlineColor =10921638 + + LayoutCachedLeft =6240 + LayoutCachedTop =1020 + LayoutCachedWidth =6960 + LayoutCachedHeight =1380 + 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 + CanGrow = NotDefault + CanShrink = NotDefault + Height =6000 + Name ="Detail" + AlternateBackColor =15921906 + AlternateBackThemeColorIndex =1 + AlternateBackShade =95.0 + BackThemeColorIndex =1 + Begin + Begin CommandButton + OverlapFlags =85 + Left =6720 + Top =60 + Width =720 + TabIndex =3 + ForeColor =4210752 + Name ="btnSave" + Caption ="Edit" + OnClick ="[Event Procedure]" + ControlTipText ="Save Record" + GridlineColor =10921638 + ImageData = Begin + 0x2800000010000000100000000100200000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x000000000000000000000000d0687050c06860ffb05850ffa05050ffa05050ff , + 0xa05050ff904850ff904840ff904840ff804040ff803840ff803840ff703840ff , + 0x703830ff0000000000000000d06870fff09090ffe08080ffb04820ff403020ff , + 0xc0b8b0ffc0b8b0ffd0c0c0ffd0c8c0ff505050ffa04030ffa04030ffa03830ff , + 0x703840ff0000000000000000d07070ffff98a0fff08880ffe08080ff705850ff , + 0x404030ff907870fff0e0e0fff0e8e0ff908070ffa04030ffa04040ffa04030ff , + 0x803840ff0000000000000000d07870ffffa0a0fff09090fff08880ff705850ff , + 0x000000ff404030fff0d8d0fff0e0d0ff807860ffb04840ffb04840ffa04040ff , + 0x804040ff0000000000000000d07880ffffa8b0ffffa0a0fff09090ff705850ff , + 0x705850ff705850ff705850ff706050ff806860ffc05850ffb05050ffb04840ff , + 0x804040ff0000000000000000e08080ffffb0b0ffffb0b0ffffa0a0fff09090ff , + 0xf08880ffe08080ffe07880ffd07070ffd06870ffc06060ffc05850ffb05050ff , + 0x904840ff0000000000000000e08890ffffb8c0ffffb8b0ffd06060ffc06050ff , + 0xc05850ffc05040ffb05030ffb04830ffa04020ffa03810ffc06060ffc05850ff , + 0x904840ff0000000000000000e09090ffffc0c0ffd06860ffffffffffffffffff , + 0xfff8f0fff0f0f0fff0e8e0fff0d8d0ffe0d0c0ffe0c8c0ffa03810ffc06060ff , + 0x904850ff0000000000000000e098a0ffffc0c0ffd07070ffffffffffffffffff , + 0xfffffffffff8f0fff0f0f0fff0e8e0fff0d8d0ffe0d0c0ffa04020ffd06860ff , + 0xa05050ff0000000000000000f0a0a0ffffc0c0ffe07870ffffffffffffffffff , + 0xfffffffffffffffffff8f0fff0f0f0fff0e8e0fff0d8d0ffb04830ffd07070ff , + 0xa05050ff0000000000000000f0a8a0ffffc0c0ffe08080ffffffffffffffffff , + 0xfffffffffffffffffffffffffff8f0fff0f0f0fff0e8e0ffb05030ffe07880ff , + 0xa05050ff0000000000000000f0b0b0ffffc0c0fff08890ffffffffffffffffff , + 0xfffffffffffffffffffffffffffffffffff8f0fff0f0f0ffc05040ff603030ff , + 0xb05850ff0000000000000000f0b0b0ffffc0c0ffff9090ffffffffffffffffff , + 0xfffffffffffffffffffffffffffffffffffffffffff8f0ffc05850ffb05860ff , + 0xb05860ff0000000000000000f0b8b0fff0b8b0fff0b0b0fff0b0b0fff0a8b0ff , + 0xf0a0a0ffe098a0ffe09090ffe09090ffe08890ffe08080ffd07880ffd07870ff , + 0xd07070ff00000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000 + End + + LayoutCachedLeft =6720 + LayoutCachedTop =60 + LayoutCachedWidth =7440 + LayoutCachedHeight =420 + BackColor =14136213 + BorderColor =14136213 + HoverColor =15060409 + PressedColor =9592887 + HoverForeColor =4210752 + PressedForeColor =4210752 + WebImagePaddingLeft =2 + WebImagePaddingTop =2 + WebImagePaddingRight =1 + WebImagePaddingBottom =1 + Overlaps =1 + End + Begin Subform + CanShrink = NotDefault + TabStop = NotDefault + OverlapFlags =215 + Left =105 + Top =1500 + Width =7650 + Height =4380 + TabIndex =7 + BorderColor =10921638 + Name ="list" + SourceObject ="Form.VegSpeciesList" + GridlineColor =10921638 + + LayoutCachedLeft =105 + LayoutCachedTop =1500 + LayoutCachedWidth =7755 + LayoutCachedHeight =5880 + End + Begin CommandButton + TabStop = NotDefault + OverlapFlags =93 + Left =5940 + Top =60 + Width =720 + TabIndex =4 + ForeColor =4210752 + Name ="btnUndo" + Caption ="Edit" + OnClick ="[Event Procedure]" + ControlTipText ="Undo/Clear values" + GridlineColor =10921638 + ImageData = Begin + 0x2800000010000000100000000100200000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000f0906060d0784080b0583010000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000e0785040f08850ffd07040ffa05830500000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000f0906020d0704060f08050ffd07050f0a050300000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x00000000000000000000000000000000c06840d0f08850ffc078508000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0xf0c0b01000000000000000000000000090482040e07840ffe08860ffe0a08000 , + 0x00000000000000000000000000000000d07040ffd07040ffc06840ffb06030ff , + 0xb05830ff905030ff0000000000000000b0603020c06840ffe08050ffd0886080 , + 0x00000000000000000000000000000000d07850ffe07030fff08050fff09870ff , + 0xe09060fff0a08040000000000000000080402000c06840ffe07840f0e09870c0 , + 0x00000000000000000000000000000000d08050ffe08050fff09060fff0a070ff , + 0x904830b0b0603040000000000000000080402000c06840ffd07040f0e09870d0 , + 0x00000000000000000000000000000000d08860ffe09060fff09870fff08850f0 , + 0xb06040ffb06040ffb060307000000000b0805020a05830f0d07840f0e09070d0 , + 0x000000000000000000000000e0b09010c08060ffd09870e0d0886090d09070ff , + 0xd08050ffc07040ffc06840ffb06030c0b07040e0a06040ffe08050ffd0a080e0 , + 0x00000000000000000000000000000000c08860ffd0a0804000000000d08860c0 , + 0xd08860ffd08050f0c06840ffb06840ffb06030f0e07840f0e0a080f0d09880e0 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0xf0a880c0e09880ffe09870f0e09070f0e09070e0e0a080f0e0a890f0f0b8a020 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x00000000f0b89060f0b090c0f0b8a0e0f0c0a0c0f0c0a090f0c0b02000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000 + End + + LayoutCachedLeft =5940 + LayoutCachedTop =60 + LayoutCachedWidth =6660 + LayoutCachedHeight =420 + BackColor =14136213 + BorderColor =14136213 + HoverColor =15060409 + PressedColor =9592887 + HoverForeColor =4210752 + PressedForeColor =4210752 + WebImagePaddingLeft =2 + WebImagePaddingTop =2 + WebImagePaddingRight =1 + WebImagePaddingBottom =1 + Overlaps =1 + End + Begin Rectangle + SpecialEffect =0 + BackStyle =1 + OldBorderStyle =0 + OverlapFlags =93 + Top =1380 + Width =7860 + Height =4620 + BackColor =4144959 + BorderColor =10921638 + Name ="rctList" + GridlineColor =10921638 + LayoutCachedTop =1380 + LayoutCachedWidth =7860 + LayoutCachedHeight =6000 + BackThemeColorIndex =-1 + End + Begin TextBox + TabStop = NotDefault + OldBorderStyle =0 + OverlapFlags =85 + BackStyle =0 + IMESentenceMode =3 + Left =7560 + Top =105 + Width =240 + Height =300 + FontSize =9 + TabIndex =6 + BorderColor =8355711 + ForeColor =8355711 + Name ="tbxID" + DefaultValue ="0" + GridlineColor =10921638 + + LayoutCachedLeft =7560 + LayoutCachedTop =105 + LayoutCachedWidth =7800 + LayoutCachedHeight =405 + BorderThemeColorIndex =0 + BorderTint =50.0 + BorderShade =100.0 + ForeTint =50.0 + End + Begin TextBox + TabStop = NotDefault + OldBorderStyle =0 + OverlapFlags =85 + BackStyle =0 + IMESentenceMode =3 + Left =120 + Top =60 + Width =720 + Height =300 + FontSize =9 + TabIndex =5 + BorderColor =8355711 + ForeColor =690698 + Name ="tbxIcon" + GridlineColor =10921638 + + LayoutCachedLeft =120 + LayoutCachedTop =60 + LayoutCachedWidth =840 + LayoutCachedHeight =360 + BorderThemeColorIndex =0 + BorderTint =50.0 + BorderShade =100.0 + ForeThemeColorIndex =-1 + ForeTint =50.0 + End + Begin ComboBox + ColumnHeads = NotDefault + LimitToList = NotDefault + OverlapFlags =85 + IMESentenceMode =3 + ColumnCount =5 + Left =900 + Top =60 + Width =3654 + Height =315 + FontSize =9 + BackColor =65535 + BorderColor =10921638 + ForeColor =4210752 + ConditionalFormat = Begin + 0x01000000a0000000020000000100000000000000000000001b00000001000000 , + 0x00000000fff2000000000000030000001c0000001f0000000100000000000000 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x5b007400620078004d006f00640061006c00530065006400530069007a006500 , + 0x5d002e00560061006c00750065003d0022002200000000002200220000000000 + End + Name ="cbxSpecies" + RowSourceType ="Table/Query" + ColumnWidths ="0;1008;288;0;0" + AfterUpdate ="[Event Procedure]" + ControlTipText ="Species" + GridlineColor =10921638 + AllowValueListEdits =0 + + LayoutCachedLeft =900 + LayoutCachedTop =60 + LayoutCachedWidth =4554 + LayoutCachedHeight =375 + BackThemeColorIndex =-1 + ForeThemeColorIndex =0 + ForeTint =75.0 + ForeShade =100.0 + ConditionalFormat14 = Begin + 0x01000200000001000000000000000100000000000000fff200001a0000005b00 , + 0x7400620078004d006f00640061006c00530065006400530069007a0065005d00 , + 0x2e00560061006c00750065003d00220022000000000000000000000000000000 , + 0x0000000000000000000000030000000100000000000000ffffff000200000022 , + 0x002200000000000000000000000000000000000000000000 + End + End + Begin Label + BackStyle =1 + OverlapFlags =223 + TextAlign =3 + Top =1140 + Width =7860 + Height =315 + FontSize =9 + LeftMargin =360 + TopMargin =36 + RightMargin =360 + BackColor =4144959 + BorderColor =8355711 + ForeColor =16777164 + Name ="lblMsg" + Caption ="msg" + FontName ="Segoe UI" + GridlineColor =10921638 + LayoutCachedTop =1140 + LayoutCachedWidth =7860 + LayoutCachedHeight =1455 + ThemeFontIndex =-1 + BackThemeColorIndex =-1 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin Label + OverlapFlags =223 + TextAlign =2 + Left =4320 + Top =960 + Width =825 + Height =600 + FontSize =20 + BackColor =4144959 + BorderColor =8355711 + ForeColor =16772541 + Name ="lblMsgIcon" + Caption ="icon" + FontName ="Segoe UI" + GridlineColor =10921638 + LayoutCachedLeft =4320 + LayoutCachedTop =960 + LayoutCachedWidth =5145 + LayoutCachedHeight =1560 + ThemeFontIndex =-1 + BackThemeColorIndex =-1 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin CheckBox + OverlapFlags =223 + Left =5640 + Top =135 + Width =360 + Height =360 + TabIndex =1 + BorderColor =10921638 + Name ="chkIsSeedling" + AfterUpdate ="[Event Procedure]" + DefaultValue ="0" + GridlineColor =10921638 + + LayoutCachedLeft =5640 + LayoutCachedTop =135 + LayoutCachedWidth =6000 + LayoutCachedHeight =495 + Begin + Begin Label + OverlapFlags =85 + Left =4620 + Top =60 + Width =990 + Height =315 + BorderColor =8355711 + ForeColor =8355711 + Name ="lblIsSeedling" + Caption ="Seedling?" + GridlineColor =10921638 + LayoutCachedLeft =4620 + LayoutCachedTop =60 + LayoutCachedWidth =5610 + LayoutCachedHeight =375 + End + End + End + Begin TextBox + Visible = NotDefault + OverlapFlags =85 + IMESentenceMode =3 + Left =1200 + Top =480 + Width =2850 + Height =315 + TabIndex =2 + BackColor =65535 + BorderColor =10921638 + ForeColor =4210752 + Name ="tbxCoverPct" + ConditionalFormat = Begin + 0x010000009e000000020000000100000000000000000000001a00000001000000 , + 0x00000000fff2000000000000030000001b0000001e0000000100000000000000 , + 0xffffff0000000000000000000000000000000000000000000000000000000000 , + 0x5b0074006200780055006e006b006e006f0077006e0043006f00640065005d00 , + 0x2e00560061006c00750065003d0022002200000000002200220000000000 + End + GridlineColor =10921638 + + LayoutCachedLeft =1200 + LayoutCachedTop =480 + LayoutCachedWidth =4050 + LayoutCachedHeight =795 + BackThemeColorIndex =-1 + ConditionalFormat14 = Begin + 0x01000200000001000000000000000100000000000000fff20000190000005b00 , + 0x74006200780055006e006b006e006f0077006e0043006f00640065005d002e00 , + 0x560061006c00750065003d002200220000000000000000000000000000000000 , + 0x000000000000000000030000000100000000000000ffffff0002000000220022 , + 0x00000000000000000000000000000000000000000000 + End + End + Begin Label + Visible = NotDefault + OverlapFlags =85 + Left =120 + Top =480 + Width =990 + Height =315 + BorderColor =8355711 + ForeColor =8355711 + Name ="lblCoverPct" + Caption ="Cover %" + GridlineColor =10921638 + LayoutCachedLeft =120 + LayoutCachedTop =480 + LayoutCachedWidth =1110 + LayoutCachedHeight =795 + End + Begin Label + Visible = NotDefault + FontItalic = NotDefault + OverlapFlags =119 + Left =4140 + Top =480 + Width =1860 + Height =360 + FontSize =8 + FontWeight =500 + BorderColor =8355711 + ForeColor =16737792 + Name ="lblCoverPctHint" + Caption ="Cover pct hint" + GridlineColor =10921638 + LayoutCachedLeft =4140 + LayoutCachedTop =480 + LayoutCachedWidth =6000 + LayoutCachedHeight =840 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + End + End + Begin FormFooter + Height =0 + Name ="FormFooter" + AlternateBackThemeColorIndex =1 + AlternateBackShade =95.0 + BackThemeColorIndex =1 + 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: VegSpecies +' Level: Application form +' Version: 1.05 +' Basis: Dropdown form +' +' Description: VegSpecies form object related properties, functions & procedures for UI display +' +' Source/date: Bonnie Campbell, May 31, 2016 +' References: - +' Revisions: BLC - 5/31/2016 - 1.00 - initial version +' BLC - 8/23/2016 - 1.01 - changed ReadyForSave() to public for +' mod_App_Data Upsert/SetRecord() +' BLC - 10/21/2016 - 1.02 - removed ButtonCaption, SelectedID, SelectedValue properties, +' use GetContext() +' BLC - 10/24/2016 - 1.03 - revised to accommodate VegPlot WCC, URC, ARC; & +' use UpsertRecord() +' BLC - 10/19/2017 - 1.04 - added comment length +' BLC - 11/26/2017 - 1.05 - display LU code & Utah sp vs ddSpecies column +' renamed to VegSpecies to separate out walk specific data +' ================================= + +'--------------------- +' Simulated Inheritance +'--------------------- + +'--------------------- +' Declarations +'--------------------- +Private m_Title As String +Private m_Directions As String +Private m_CallingForm As String +Private m_FormContext As String + +Private m_SaveOK As Boolean 'ok to save record (prevents bound form from immediately updating) + +'--------------------- +' Event Declarations +'--------------------- +Public Event InvalidTitle(Value As String) +Public Event InvalidDirections(Value As String) +Public Event InvalidCallingForm(Value As String) +Public Event InvalidFormContext(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) + If Len(Value) > 0 Then + m_CallingForm = Value + Else + RaiseEvent InvalidCallingForm(Value) + End If +End Property + +Public Property Get CallingForm() As String + CallingForm = m_CallingForm +End Property + +Public Property Let FormContext(Value As String) + If Len(Value) > 0 Then + m_FormContext = Value + Else + RaiseEvent InvalidFormContext(Value) + End If +End Property + +Public Property Get FormContext() As String + FormContext = m_FormContext +End Property + +'--------------------- +' Methods +'--------------------- + +' --------------------------------- +' Sub: Form_Open +' Description: form opening actions +' Assumptions: Veg walk species are noted as presence/absence only. Not % covers. +' OpenArgs passes only the calling form name +' Parameters: - +' Returns: - +' Throws: none +' References: +' HansUp, February 26, 2014 +' http://stackoverflow.com/questions/22021802/resize-form-in-ms-access-by-changing-detail-height +' Source/date: Bonnie Campbell, May 31, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 5/31/2016 - initial version +' BLC - 7/13/2016 - added validation, hints +' BLC - 8/2/2016 - use Me.CallingForm +' BLC - 10/21/2016 - use GetContext() +' BLC - 10/24/2016 - revise to accommodate VegPlot WCC, URC, ARC +' BLC - 1/10/2017 - revise to use s_events_by_site to avoid conflict w/ +' context (picking site that doesn't match context) +' BLC - 11/26/2017 - display LU code & Utah sp vs ddSpecies column +' --------------------------------- +Private Sub Form_Open(Cancel As Integer) +On Error GoTo Err_Handler + + Dim strCaller As String, strTitle As String + + 'default + Me.CallingForm = "Main" + Me.FormContext = Me.Name + strCaller = Me.Name + strTitle = strCaller + + If Len(Nz(Me.OpenArgs, "")) > 0 Then + + 'identify calling form + Me.FormContext = Split(Me.OpenArgs, "|")(0) + + strTitle = InsertSpaceBeforeCaps((Split(Me.OpenArgs, "|")(0))) + + Select Case Me.FormContext + Case "WoodyCanopySpecies", "UnderstoryRootedSpecies", "AllRootedSpecies" + strCaller = "VegPlot" + Case Else + strCaller = Me.FormContext + End Select + + Me.CallingForm = strCaller + + End If + + 'minimize calling form + ToggleForm Me.CallingForm, -1 + + 'set UI based on form context + Select Case Me.FormContext + + Case "VegSpecies" + 'expose event, start date for VegSpecies form + lblEvent.Visible = True + cbxEvent.Visible = True + btnAddEvent.Visible = True + + 'set list position & hide cover % UI + lblMsgIcon.Top = 0.375 * TWIPS_PER_INCH + lblMsg.Top = 0.5 * TWIPS_PER_INCH + rctList.Top = 0.6667 * TWIPS_PER_INCH + list.Top = 0.75 * TWIPS_PER_INCH + Me.Detail.Height = 3.875 * TWIPS_PER_INCH + lblCoverPct.Visible = False + tbxCoverPct.Visible = False + lblCoverPctHint.Visible = False + 'move form to force height change + Me.Move Me.WindowLeft, Height:=Me.FormHeader.Height + Me.Detail.Height + + Case "WoodyCanopySpecies", "UnderstoryRootedSpecies", "AllRootedSpecies" + 'hide event (already on VegPlot form) + lblEvent.Visible = False + cbxEvent.Visible = False + btnAddEvent.Visible = False + + 'drop list down & expose cover % UI + lblMsgIcon.Top = 0.6667 * TWIPS_PER_INCH + lblMsg.Top = 0.7917 * TWIPS_PER_INCH + rctList.Top = 0.9583 * TWIPS_PER_INCH + list.Top = 1.0417 * TWIPS_PER_INCH + Me.Detail.Height = 4.1667 * TWIPS_PER_INCH + lblCoverPct.Visible = True + tbxCoverPct.Visible = True + lblCoverPctHint.Visible = True + lblCoverPctHint.Caption = "nearest 1%" + 'move form to force height change + Me.Move Me.WindowLeft, Height:=Me.FormHeader.Height + Me.Detail.Height + End Select + + 'set context - based on TempVars + lblContext.ForeColor = lngLime + lblContext.Caption = GetContext() + + Title = IIf(strCaller = "VegPlot", strTitle, "VegSpecies") + lblTitle.Caption = "" 'hide inner title + Directions = "Enter species found and click save." + tbxIcon.Value = StringFromCodepoint(uBullet) + lblDirections.ForeColor = lngLtBlue + btnComment.Caption = StringFromCodepoint(uComment) + btnComment.ForeColor = lngBlue + + btnAddUnknown.Caption = StringFromCodepoint(uQuestionMark) & Space(2) & "Add Unknown" + btnAddEvent.Caption = StringFromCodepoint(uCalendarSpiral) & Space(2) & "Add Event" + btnSpeciesSearch.Caption = StringFromCodepoint(uMagnifierRight) & Space(2) & "Species" + btnAddUnknown.ForeColor = lngBlue + btnAddEvent.ForeColor = lngBlue + btnSpeciesSearch.ForeColor = lngBlue + + 'hints + + 'validation + + 'set hover + btnComment.HoverColor = lngGreen + btnAddUnknown.HoverColor = lngGreen + btnAddEvent.HoverColor = lngGreen + btnSpeciesSearch.HoverColor = lngGreen + + 'defaults + tbxIcon.ForeColor = lngRed + btnComment.Enabled = False + btnSave.Enabled = False + cbxSpecies.BackColor = lngYellow + + 'determine level for events + Dim Filter As String + If Not TempVars("SiteCode") Is Nothing Then + Filter = "s_events_by_site" + If Not TempVars("Feature") Is Nothing Then + Filter = "s_events_by_feature" + End If + End If + + 'populate events +' Set cbxEvent.Recordset = GetRecords("s_events_by_park_river") + Set cbxEvent.Recordset = GetRecords(Filter) + cbxEvent.BoundColumn = 1 + cbxEvent.ColumnCount = 5 +' cbxEvent.ColumnWidths = "0;0;0;0;2" + cbxEvent.ColumnWidths = "0;0;1in;0;0" + + 'populate species + ' ------------------------------------------------------------------------------------- + ' NOTE: s_enums_for_type *MUST* include "DISTINCT" for the combobox autoexpand to work!(Access bug) + ' Dan Some, August 7, 2011 + ' http://answers.microsoft.com/en-us/office/forum/office_2007-access/combo-box-property-auto-expand-yes-doesnt-seem-to/05fa61af-853e-4c9d-a3e3-2f51aa094668 + ' ------------------------------------------------------------------------------------- + Set cbxSpecies.Recordset = GetRecords("s_species_by_park") '.RowSource = GetTemplate("s_species_by_park") + 'columns: Master_PLANT_Code, LU_Code, Utah_species, ddSpecies (LU_code (Utah_species)) + cbxSpecies.BoundColumn = 1 'bind to label (not ID) + cbxSpecies.ColumnCount = 4 + cbxSpecies.ColumnHeads = True + 'cbxSpecies.ColumnWidths = "0;.7in;.2in;0;0" 'display the display column (combines label - summary) + 'display: LU code & Utah species (ddSpecies column) but record Master plant code + cbxSpecies.ColumnWidths = "0;.7in;.7in;0" 'display LU code & Utah sp vs display column (combines label - summary) + + 'ID default -> value used only for edits of existing table values + tbxID.Value = 0 + + 'defaults --> turn off items + + 'adjust UI based on park +' Select Case TempVars("ParkCode") +' Case "BLCA" +' +' Case "CANY" +' +' Case "DINO" +' +' End Select + + 'ID default -> value used only for edits of existing table values + tbxID.DefaultValue = 0 + + 'initialize values + ClearForm Me + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - Form_Open[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: Form_Load +' Description: form loading actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, May 31, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 5/31/2016 - initial version +' --------------------------------- +Private Sub Form_Load() +On Error GoTo Err_Handler + + 'eliminate NULLs + If IsNull(Me.OpenArgs) Then GoTo Exit_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[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: Form_Current +' Description: form current actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, August 2, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 8/2/2016 - initial version +' --------------------------------- +Private Sub Form_Current() +On Error GoTo Err_Handler + +' If tbxID > 0 Then btnComment.Enabled = True + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - Form_Current[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: cbxEvent_AfterUpdate +' Description: Combobox after update actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, October 25, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 10/25/2016 - initial version +' --------------------------------- +Private Sub cbxEvent_AfterUpdate() +On Error GoTo Err_Handler + + 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[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: cbxSpecies_AfterUpdate +' Description: Combobox after update actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, August 2, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 8/2/2016 - initial version +' BLC - 10/25/2016 - revised to use ReadyForSave only +' --------------------------------- +Private Sub cbxSpecies_AfterUpdate() +On Error GoTo Err_Handler + + ReadyForSave + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - cbxSpecies_AfterUpdate[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: chkIsSeedling_AfterUpdate +' Description: Checkbox after update actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, October 25, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 10/25/2016 - initial version +' --------------------------------- +Private Sub chkIsSeedling_AfterUpdate() +On Error GoTo Err_Handler + + ReadyForSave + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - chkIsSeedling_AfterUpdate[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnUndo_Click +' Description: Undo button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, August 2, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 8/2/2016 - initial version +' BLC - 8/2/2016 - revised to use ClearForm() +' --------------------------------- +Private Sub btnUndo_Click() +On Error GoTo Err_Handler + + ClearForm Me + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnUndo_Click[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnSave_Click +' Description: Save button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, May 31, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 5/31/2016 - initial version +' BLC - 10/25/2016 - revised to use UpsertRecord() +' BLC - 11/26/2017 - updated to use m_SaveOK & ClearForm +' --------------------------------- +Private Sub btnSave_Click() +On Error GoTo Err_Handler + + 'set enable btnSave_Click save + m_SaveOK = True + + UpsertRecord Me + + Me![list].Form.Requery + + 'revert to disable non-btnSave_Click save + m_SaveOK = False + + 'clear fields + ClearForm Me + +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[VegSpecies 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, August 2, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 8/2/2016 - initial version +' --------------------------------- +Private Sub btnAddEvent_Click() +On Error GoTo Err_Handler + + 'open form + DoCmd.OpenForm "Events", acNormal, , , , , Me.Name + + 'refresh cbx + +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[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnAddUnknown_Click +' Description: Woody Canopy Cover button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, August 2, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 8/2/2016 - initial version +' --------------------------------- +Private Sub btnAddUnknown_Click() +On Error GoTo Err_Handler + + 'open form + DoCmd.OpenForm "Unknown", acNormal, , , , , Me.Name + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnAddUnknown_Click[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnSpeciesSearch_Click +' Description: Woody Canopy Cover button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' SoSpeciesSearche/date: Bonnie Campbell, August 2, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 8/2/2016 - initial version +' --------------------------------- +Private Sub btnSpeciesSearch_Click() +On Error GoTo Err_Handler + + 'open form + DoCmd.OpenForm "SpeciesSearch", acNormal, , , , , Me.Name + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnSpeciesSearch_Click[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnSetObserverRecorder_Click +' Description: Set observer/recorder button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, August 2, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/6/2017 - initial version +' --------------------------------- +Private Sub btnSetObserverRecorder_Click() +On Error GoTo Err_Handler + + 'open comment form + DoCmd.OpenForm "SetObserverRecorder", acNormal, , , , , Me.FormContext & "|" & tbxID + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnSetObserverRecorder_Click[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnComment_Click +' Description: Undo button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, August 2, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 8/2/2016 - initial version +' BLC - 10/25/2016 - revised to use strFormContext vs. VegSpecies +' BLC - 10/19/2017 - added comment length +' --------------------------------- +Private Sub btnComment_Click() +On Error GoTo Err_Handler + + 'open comment form + DoCmd.OpenForm "Comment", acNormal, , , , , Me.FormContext & "|" & tbxID & "|255" + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnComment_Click[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: Form_Close +' Description: form closing actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, May 31, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 5/31/2016 - initial version +' BLC - 8/2/2016 - revised to use ToggleForm(), Me.CallingForm +' --------------------------------- +Private Sub Form_Close() +On Error GoTo Err_Handler + + 'restore calling form + ToggleForm Me.CallingForm, 0 + +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[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: ReadyForSave +' Description: Check if form values are ready to save +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, May 31, 2016 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 5/31/2016 - initial version +' BLC - 8/23/2016 - changed ReadyForSave() to public for mod_App_Data Upsert/SetRecord() +' BLC - 11/26/2017 - updated to enable Save when tbxID = 0 (new records only) +' --------------------------------- +Public Sub ReadyForSave() +On Error GoTo Err_Handler + + Dim isOK As Boolean + + 'default + isOK = False + + 'set color of icon depending on if values are set + 'requires: EventID, SiteID, FeatureID, + ' Species, IsSeedlingS + ' If Nz(cbxSpecies.Value, "") > -1 _ +' And Nz(chkIsSeedling.Value, "") > -1 _ +' And Nz(cbxEvent.Value, 0) > 0 Then + + Select Case Me.CallingForm + Case "VegPlot" + If Nz(cbxSpecies.Value, 0) > 0 _ + And Nz(tbxCoverPct.Value, 0) >= 0 Then + + isOK = True + + End If + Case "VegSpecies" + If Nz(cbxSpecies.Value, 0) > 0 _ + And Nz(cbxEvent.Value, 0) > 0 Then + + isOK = True + + End If + End Select + + tbxIcon.ForeColor = IIf(isOK = True, lngDkGreen, lngRed) + 'enable save button only for new events (tbxID = 0) + If tbxID = 0 Then btnSave.Enabled = isOK + + 'refresh form +' Me.Requery + + 'enable comment if ID > 0 + If tbxID > 0 Then btnComment.Enabled = True + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - ReadyForSave[VegSpecies form])" + End Select + Resume Exit_Handler +End Sub diff --git a/source/forms/VegSpeciesList.bas b/source/forms/VegSpeciesList.bas new file mode 100644 index 0000000..d3e74d5 --- /dev/null +++ b/source/forms/VegSpeciesList.bas @@ -0,0 +1,747 @@ +Version =20 +VersionRequired =20 +Begin Form + RecordSelectors = NotDefault + MaxButton = NotDefault + MinButton = NotDefault + ControlBox = NotDefault + NavigationButtons = NotDefault + CloseButton = NotDefault + DividingLines = NotDefault + AllowAdditions = NotDefault + AllowEdits = NotDefault + ScrollBars =2 + ViewsAllowed =1 + BorderStyle =1 + PictureAlignment =2 + DatasheetGridlinesBehavior =3 + GridX =24 + GridY =24 + Width =7860 + DatasheetFontHeight =11 + ItemSuffix =32 + Right =8940 + Bottom =11385 + DatasheetGridlinesColor =14806254 + RecSrcDt = Begin + 0x5614fef60dcbe440 + End + RecordSource ="VegWalkSpecies" + Caption ="_List" + OnCurrent ="[Event Procedure]" + OnOpen ="[Event Procedure]" + OnClose ="[Event Procedure]" + DatasheetFontName ="Calibri" + PrtMip = Begin + 0x6801000068010000680100006801000000000000201c0000e010000001000000 , + 0x010000006801000000000000a10700000100000001000000 + End + OnLoad ="[Event Procedure]" + AllowDatasheetView =0 + AllowPivotTableView =0 + AllowPivotChartView =0 + AllowPivotChartView =0 + FilterOnLoad =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 CommandButton + FontSize =11 + FontWeight =400 + FontName ="Calibri" + ForeThemeColorIndex =0 + ForeTint =75.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + UseTheme =1 + Shape =1 + Gradient =12 + BackThemeColorIndex =4 + BackTint =60.0 + BorderLineStyle =0 + BorderColor =16777215 + BorderThemeColorIndex =4 + BorderTint =60.0 + ThemeFontIndex =1 + HoverThemeColorIndex =4 + HoverTint =40.0 + PressedThemeColorIndex =4 + PressedShade =75.0 + HoverForeThemeColorIndex =0 + HoverForeTint =75.0 + PressedForeThemeColorIndex =0 + PressedForeTint =75.0 + End + Begin TextBox + AddColon = NotDefault + FELineBreak = NotDefault + BorderLineStyle =0 + LabelX =-1800 + FontSize =11 + FontName ="Calibri" + AsianLineBreak =1 + BackThemeColorIndex =1 + BorderThemeColorIndex =1 + BorderShade =65.0 + ThemeFontIndex =1 + ForeThemeColorIndex =0 + ForeTint =75.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + End + Begin ComboBox + AddColon = NotDefault + BorderLineStyle =0 + LabelX =-1800 + FontSize =11 + FontName ="Calibri" + AllowValueListEdits =1 + InheritValueList =1 + ThemeFontIndex =1 + BackThemeColorIndex =1 + BorderThemeColorIndex =1 + BorderShade =65.0 + ForeThemeColorIndex =2 + ForeShade =50.0 + GridlineThemeColorIndex =1 + GridlineShade =65.0 + End + Begin FormHeader + Height =1335 + BackColor =4144959 + Name ="FormHeader" + AlternateBackThemeColorIndex =1 + AlternateBackShade =95.0 + Begin + Begin Label + OverlapFlags =93 + Width =3480 + Height =300 + BorderColor =8355711 + ForeColor =16777215 + Name ="lblTitle" + GridlineColor =10921638 + LayoutCachedWidth =3480 + LayoutCachedHeight =300 + ForeThemeColorIndex =1 + ForeTint =100.0 + End + Begin Label + OverlapFlags =215 + Left =180 + Top =120 + Width =7260 + Height =840 + BorderColor =8355711 + ForeColor =16777164 + Name ="lblDirections" + 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 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin Label + OverlapFlags =85 + Left =1560 + Top =1020 + Width =1245 + Height =315 + FontWeight =500 + BorderColor =8355711 + ForeColor =16777215 + Name ="lblSpecies" + Caption ="Species" + GridlineColor =10921638 + LayoutCachedLeft =1560 + LayoutCachedTop =1020 + LayoutCachedWidth =2805 + LayoutCachedHeight =1335 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin Label + OverlapFlags =85 + Left =960 + Top =1020 + Width =270 + Height =315 + FontWeight =500 + BorderColor =8355711 + ForeColor =16777215 + Name ="lblHdrID" + Caption ="ID" + GridlineColor =10921638 + LayoutCachedLeft =960 + LayoutCachedTop =1020 + LayoutCachedWidth =1230 + LayoutCachedHeight =1335 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + Begin Label + OverlapFlags =85 + TextAlign =2 + Left =4620 + Top =1020 + Width =1245 + Height =315 + FontWeight =500 + BorderColor =8355711 + ForeColor =16777215 + Name ="lblIsSeedling" + Caption ="Seedling?" + ControlTipText ="Indicates if the species present is a seedling (not an adult)" + GridlineColor =10921638 + LayoutCachedLeft =4620 + LayoutCachedTop =1020 + LayoutCachedWidth =5865 + LayoutCachedHeight =1335 + ForeThemeColorIndex =-1 + ForeTint =100.0 + End + End + End + Begin Section + Height =420 + Name ="Detail" + AlternateBackColor =15921906 + AlternateBackThemeColorIndex =1 + AlternateBackShade =95.0 + BackThemeColorIndex =1 + Begin + Begin CommandButton + OverlapFlags =85 + Left =6000 + Width =720 + ForeColor =4210752 + Name ="btnEdit" + Caption ="Edit" + OnClick ="[Event Procedure]" + GridlineColor =10921638 + ImageData = Begin + 0x2800000010000000100000000100200000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x000000000000000000000000303840ff404040ff505050ff504850f080686020 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x000000000000000000000000606060ff909890ffd0d0d0ffa0a8b0ff304850ff , + 0xa090905000000000000000000000000000000000000000000000000000000000 , + 0x000000000000000000000000a0a0a0fff0f0f0fff0f8ffffc0e0f0ff5090b0ff , + 0x204850ff80686020000000000000000000000000000000000000000000000000 , + 0x00000000000000000000000080787080e0e0e0ffd0f0f0ff90e0f0ff50c0d0ff , + 0x4098b0ff204850ff806860200000000000000000000000000000000000000000 , + 0x000000000000000000000000000000006090a080c0e8f0ffa0f0f0ff70e0f0ff , + 0x50c0d0ff4098b0ff204850ff8068602000000000000000000000000000000000 , + 0x00000000000000000000000000000000000000006090a090b0e8f0ffa0f0f0ff , + 0x70e0f0ff50c0d0ff4098b0ff204850ff80686020000000000000000000000000 , + 0x0000000000000000000000000000000000000000000000006090a090b0e8f0ff , + 0xa0f0f0ff70e0f0ff50c0d0ff4098b0ff204850ff806860200000000000000000 , + 0x000000000000000000000000000000000000000000000000000000006090a0a0 , + 0xb0e8f0ffa0f0f0ff70e0f0ff50c0d0ff4098b0ff204850ff8068602000000000 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0x6090a0a0b0e8f0ffa0f0f0ff70e0f0ff50c0d0ff4098b0ff204850ff80686020 , + 0x0000000000000000000000000000000000000000000000000000000000000000 , + 0xd08060006090a0a0b0e8f0ffa0f0f0ff70e0f0ff50b8d0ff4098b0ff204850ff , + 0x8068602000000000000000000000000000000000000000000000000000000000 , + 0x00000000d0d8e0006090a0b0b0e8f0ffa0f0f0ff70d0e0ff50a0b0ff808890ff , + 0x303870ff80686020000000000000000000000000000000000000000000000000 , + 0x0000000000000000d0d8e0006090a0b0c0f0f0ffa0e0e0ffb0b0a0ff5058b0ff , + 0x303090ff505880ff000000000000000000000000000000000000000000000000 , + 0x000000000000000000000000d0d8e0006090a0b0a0b8d0ff8088d0ff6070d0ff , + 0x303090ff202860ff000000000000000000000000000000000000000000000000 , + 0x00000000000000000000000000000000d0d8e0006070b0b09098d0ff7078d0ff , + 0x4050a0ff9098b0ff000000000000000000000000000000000000000000000000 , + 0x0000000000000000000000000000000000000000d0d8e000606090d05060a0ff , + 0x9090b0ff00000000 + End + + LayoutCachedLeft =6000 + LayoutCachedWidth =6720 + LayoutCachedHeight =360 + 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 TextBox + OldBorderStyle =0 + OverlapFlags =85 + BackStyle =0 + IMESentenceMode =3 + Left =120 + Top =15 + Width =720 + Height =300 + FontSize =9 + TabIndex =1 + BorderColor =8355711 + ForeColor =690698 + Name ="tbxIcon" + GridlineColor =10921638 + + LayoutCachedLeft =120 + LayoutCachedTop =15 + LayoutCachedWidth =840 + LayoutCachedHeight =315 + BorderThemeColorIndex =0 + BorderTint =50.0 + BorderShade =100.0 + ForeThemeColorIndex =-1 + ForeTint =50.0 + End + Begin CommandButton + OverlapFlags =85 + TextFontFamily =2 + Left =6780 + Width =720 + FontSize =14 + TabIndex =2 + ForeColor =255 + Name ="btnDelete" + Caption ="" + OnClick ="[Event Procedure]" + FontName ="Academy Engraved LET" + GridlineColor =10921638 + + LayoutCachedLeft =6780 + LayoutCachedWidth =7500 + LayoutCachedHeight =360 + PictureCaptionArrangement =5 + ForeThemeColorIndex =-1 + BackColor =14136213 + BorderColor =14136213 + ThemeFontIndex =-1 + HoverColor =65280 + HoverThemeColorIndex =-1 + PressedColor =9592887 + HoverForeColor =4210752 + PressedForeColor =4210752 + WebImagePaddingLeft =2 + WebImagePaddingTop =2 + WebImagePaddingRight =1 + WebImagePaddingBottom =1 + Overlaps =1 + End + Begin TextBox + Enabled = NotDefault + OldBorderStyle =0 + OverlapFlags =85 + TextAlign =1 + BackStyle =0 + IMESentenceMode =3 + Left =1440 + Top =15 + Width =3180 + Height =300 + TabIndex =3 + BorderColor =10921638 + ForeColor =4138256 + Name ="tbxSpecies" + ControlSource ="Master_PLANT_Code" + GridlineColor =10921638 + + LayoutCachedLeft =1440 + LayoutCachedTop =15 + LayoutCachedWidth =4620 + LayoutCachedHeight =315 + ForeThemeColorIndex =2 + ForeTint =100.0 + ForeShade =50.0 + End + Begin TextBox + Enabled = NotDefault + OldBorderStyle =0 + OverlapFlags =85 + TextAlign =2 + BackStyle =0 + IMESentenceMode =3 + Left =900 + Width =480 + Height =315 + TabIndex =4 + BorderColor =10921638 + ForeColor =4210752 + Name ="tbxID" + ControlSource ="ID" + GridlineColor =10921638 + + LayoutCachedLeft =900 + LayoutCachedWidth =1380 + LayoutCachedHeight =315 + End + Begin TextBox + Enabled = NotDefault + OldBorderStyle =0 + OverlapFlags =85 + TextAlign =2 + BackStyle =0 + IMESentenceMode =3 + Left =4740 + Width =975 + Height =300 + TabIndex =5 + BorderColor =10921638 + ForeColor =4138256 + Name ="tbxIsSeedling" + ControlSource ="IsSeedling" + GridlineColor =10921638 + + LayoutCachedLeft =4740 + LayoutCachedWidth =5715 + LayoutCachedHeight =300 + ForeThemeColorIndex =2 + ForeTint =100.0 + ForeShade =50.0 + End + End + End + Begin FormFooter + Height =0 + Name ="FormFooter" + AlternateBackThemeColorIndex =1 + AlternateBackShade =95.0 + BackThemeColorIndex =1 + 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: VegSpeciesList +' Level: Application form +' Version: 1.01 +' Basis: Dropdown form +' +' Description: List form object related properties, events, functions & procedures for UI display +' +' Source/date: Bonnie Campbell, November 26, 2017 +' References: - +' Revisions: BLC - 11/26/2017 - 1.00 - initial version +' ================================= + +'--------------------- +' Simulated Inheritance +'--------------------- + +'--------------------- +' Declarations +'--------------------- +Private m_Title As String +Private m_Directions As String +Private m_ButtonCaption +Private m_SelectedID As Integer +Private m_SelectedValue As String + +'--------------------- +' 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) + +'--------------------- +' 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 ButtonCaption(Value As String) + If Len(Value) > 0 Then + m_ButtonCaption = Value + + 'set the form button caption + Me.btnEdit.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 + +'--------------------- +' Methods +'--------------------- + +' --------------------------------- +' Sub: Form_Open +' Description: form opening actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, November 26, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/26/2017 - initial version +' --------------------------------- +Private Sub Form_Open(Cancel As Integer) +On Error GoTo Err_Handler + + lblTitle.Caption = "" + lblDirections.Caption = "Edit or Delete Records using the buttons for the record at right." _ + & vbCrLf & "Icon codes at left identify if record may be edited/deleted." + tbxIcon.Value = StringFromCodepoint(uLocked) + tbxIcon.ForeColor = lngDkGreen + lblDirections.ForeColor = lngLtBlue + 'set hover + btnEdit.HoverColor = lngGreen + btnDelete.HoverColor = lngGreen + + btnDelete.Caption = StringFromCodepoint(uDelete) + btnDelete.ForeColor = lngRed + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - Form_Open[VegSpeciesList form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: Form_Load +' Description: form loading actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, November 26, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/26/2017 - initial version +' --------------------------------- +Private Sub Form_Load() +On Error GoTo Err_Handler + + 'eliminate NULLs + If IsNull(Me.OpenArgs) Then GoTo Exit_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[VegSpeciesList form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: Form_Current +' Description: form current actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, November 26, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/26/2017 - initial version +' --------------------------------- +Private Sub Form_Current() +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_Current[VegSpeciesList form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnEdit_Click +' Description: Enter button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, November 26, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/26/2017 - initial version +' --------------------------------- +Private Sub btnEdit_Click() +On Error GoTo Err_Handler + + 'populate the parent form + PopulateForm Me.Parent, ID + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnEdit_Click[VegSpeciesList form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: btnDelete_Click +' Description: Delete button click actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, November 26, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/26/2017 - initial version +' --------------------------------- +Private Sub btnDelete_Click() +On Error GoTo Err_Handler + + Dim result As Integer + + 'identify the record ID + result = MsgBox("Delete Record this record: #" & tbxID & " ?" _ + & vbCrLf & "This action cannot be undone.", vbYesNo, "Delete Record?") + + Debug.Print Me.Parent.FormContext + + 'If result = vbYes Then DeleteRecord , tbxID + + 'clear the deleted record + Me.Requery + +Exit_Handler: + Exit Sub +Err_Handler: + Select Case Err.Number + Case Else + MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ + "Error encountered (#" & Err.Number & " - btnDelete_Click[VegSpeciesList form])" + End Select + Resume Exit_Handler +End Sub + +' --------------------------------- +' Sub: Form_Close +' Description: form closing actions +' Assumptions: - +' Parameters: - +' Returns: - +' Throws: none +' References: - +' Source/date: Bonnie Campbell, November 26, 2017 - for NCPN tools +' Adapted: - +' Revisions: +' BLC - 11/26/2017 - 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[VegSpeciesList form])" + End Select + Resume Exit_Handler +End Sub diff --git a/source/forms/VegWalk.bas b/source/forms/VegWalk.bas index 187c1f5..22d058b 100644 --- a/source/forms/VegWalk.bas +++ b/source/forms/VegWalk.bas @@ -20,15 +20,14 @@ Begin Form Width =7860 DatasheetFontHeight =11 ItemSuffix =75 - Left =3855 - Top =3150 - Right =12765 - Bottom =14535 + Left =9810 + Top =2970 + Right =17670 + Bottom =10935 DatasheetGridlinesColor =14806254 RecSrcDt = Begin - 0x06ca311a8bd5e440 + 0x68b3c3c53e07e540 End - RecordSource ="SELECT * FROM VegWalk WHERE ID = 0; " Caption ="VegWalk" OnCurrent ="[Event Procedure]" OnOpen ="[Event Procedure]" @@ -192,7 +191,7 @@ Begin Form BorderColor =8355711 ForeColor =16777164 Name ="lblDirections" - Caption ="Enter species found and click save." + Caption ="Enter veg walk info and click save. Then enter species found." GridlineColor =10921638 LayoutCachedLeft =180 LayoutCachedTop =420 @@ -210,8 +209,8 @@ Begin Form FontWeight =500 BorderColor =8355711 ForeColor =16777215 - Name ="lblSpecies" - Caption ="Species Found" + Name ="lblWalkStartDate" + Caption ="Walk Start Date" GridlineColor =10921638 LayoutCachedLeft =1080 LayoutCachedTop =1620 @@ -281,7 +280,7 @@ Begin Form BorderColor =8355711 ForeColor =6750105 Name ="lblContext" - Caption ="context" + Caption ="BLCA > Gunnison > EP > A" GridlineColor =10921638 LayoutCachedLeft =3600 LayoutCachedTop =60 @@ -290,36 +289,6 @@ Begin Form ForeThemeColorIndex =-1 ForeTint =100.0 End - Begin CommandButton - OverlapFlags =85 - Left =3480 - Top =1560 - Width =1800 - TabIndex =3 - ForeColor =16711680 - Name ="btnAddUnknown" - Caption ="? Add Unknown" - OnClick ="[Event Procedure]" - ControlTipText ="Add a new unknown species" - GridlineColor =10921638 - - LayoutCachedLeft =3480 - LayoutCachedTop =1560 - LayoutCachedWidth =5280 - LayoutCachedHeight =1920 - 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 Begin ComboBox LimitToList = NotDefault OverlapFlags =85 @@ -340,10 +309,11 @@ Begin Form 0x5b007400620078004d006f00640061006c00530065006400530069007a006500 , 0x5d002e00560061006c00750065003d0022002200000000002200220000000000 End - Name ="cbxEvent" + Name ="cbxEventID" RowSourceType ="Table/Query" - ColumnWidths ="0;0;0;0;2" + ColumnWidths ="0;0;0;2880;0" AfterUpdate ="[Event Procedure]" + OnExit ="[Event Procedure]" ControlTipText ="Event (sample visit)" GridlineColor =10921638 AllowValueListEdits =0 @@ -364,36 +334,6 @@ Begin Form 0x002200000000000000000000000000000000000000000000 End End - Begin CommandButton - OverlapFlags =85 - Left =5400 - Top =1560 - Width =1800 - TabIndex =4 - ForeColor =16711680 - Name ="btnSpeciesSearch" - Caption =" Species" - OnClick ="[Event Procedure]" - ControlTipText ="Lookup species name" - GridlineColor =10921638 - - LayoutCachedLeft =5400 - LayoutCachedTop =1560 - LayoutCachedWidth =7200 - LayoutCachedHeight =1920 - 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 Begin CommandButton OverlapFlags =85 Left =4440 @@ -424,21 +364,24 @@ Begin Form WebImagePaddingBottom =1 End Begin CommandButton + Enabled = NotDefault OverlapFlags =85 Left =6240 Top =1020 Width =720 - TabIndex =5 - ForeColor =4210752 + TabIndex =3 + ForeColor =16711680 Name ="btnSetObserverRecorder" Caption ="" OnClick ="[Event Procedure]" + ControlTipText ="Set the selected veg walk's observer & recorder" GridlineColor =10921638 LayoutCachedLeft =6240 LayoutCachedTop =1020 LayoutCachedWidth =6960 LayoutCachedHeight =1380 + ForeThemeColorIndex =-1 BackColor =14136213 BorderColor =14136213 HoverColor =65280 @@ -464,11 +407,12 @@ Begin Form BackThemeColorIndex =1 Begin Begin CommandButton + Enabled = NotDefault OverlapFlags =85 Left =6720 Top =60 Width =720 - TabIndex =3 + TabIndex =2 ForeColor =4210752 Name ="btnSave" Caption ="Edit" @@ -536,7 +480,7 @@ Begin Form Top =1500 Width =7650 Height =4380 - TabIndex =7 + TabIndex =6 BorderColor =10921638 Name ="list" SourceObject ="Form.VegWalkList" @@ -549,11 +493,11 @@ Begin Form End Begin CommandButton TabStop = NotDefault - OverlapFlags =93 + OverlapFlags =85 Left =5940 Top =60 Width =720 - TabIndex =4 + TabIndex =3 ForeColor =4210752 Name ="btnUndo" Caption ="Edit" @@ -641,7 +585,7 @@ Begin Form Width =240 Height =300 FontSize =9 - TabIndex =6 + TabIndex =5 BorderColor =8355711 ForeColor =8355711 Name ="tbxID" @@ -668,9 +612,9 @@ Begin Form Width =720 Height =300 FontSize =9 - TabIndex =5 + TabIndex =4 BorderColor =8355711 - ForeColor =690698 + ForeColor =255 Name ="tbxIcon" GridlineColor =10921638 @@ -684,51 +628,6 @@ Begin Form ForeThemeColorIndex =-1 ForeTint =50.0 End - Begin ComboBox - ColumnHeads = NotDefault - LimitToList = NotDefault - OverlapFlags =85 - IMESentenceMode =3 - ColumnCount =5 - Left =900 - Top =60 - Width =3654 - Height =315 - FontSize =9 - BackColor =65535 - BorderColor =10921638 - ForeColor =4210752 - ConditionalFormat = Begin - 0x01000000a0000000020000000100000000000000000000001b00000001000000 , - 0x00000000fff2000000000000030000001c0000001f0000000100000000000000 , - 0xffffff0000000000000000000000000000000000000000000000000000000000 , - 0x5b007400620078004d006f00640061006c00530065006400530069007a006500 , - 0x5d002e00560061006c00750065003d0022002200000000002200220000000000 - End - Name ="cbxSpecies" - RowSourceType ="Table/Query" - ColumnWidths ="0;1008;288;0;0" - AfterUpdate ="[Event Procedure]" - ControlTipText ="Species" - GridlineColor =10921638 - AllowValueListEdits =0 - - LayoutCachedLeft =900 - LayoutCachedTop =60 - LayoutCachedWidth =4554 - LayoutCachedHeight =375 - BackThemeColorIndex =-1 - ForeThemeColorIndex =0 - ForeTint =75.0 - ForeShade =100.0 - ConditionalFormat14 = Begin - 0x01000200000001000000000000000100000000000000fff200001a0000005b00 , - 0x7400620078004d006f00640061006c00530065006400530069007a0065005d00 , - 0x2e00560061006c00750065003d00220022000000000000000000000000000000 , - 0x0000000000000000000000030000000100000000000000ffffff000200000022 , - 0x002200000000000000000000000000000000000000000000 - End - End Begin Label BackStyle =1 OverlapFlags =223 @@ -744,7 +643,6 @@ Begin Form BorderColor =8355711 ForeColor =16777164 Name ="lblMsg" - Caption ="msg" FontName ="Segoe UI" GridlineColor =10921638 LayoutCachedTop =1140 @@ -767,7 +665,6 @@ Begin Form BorderColor =8355711 ForeColor =16772541 Name ="lblMsgIcon" - Caption ="icon" FontName ="Segoe UI" GridlineColor =10921638 LayoutCachedLeft =4320 @@ -779,55 +676,18 @@ Begin Form ForeThemeColorIndex =-1 ForeTint =100.0 End - Begin CheckBox - OverlapFlags =223 - Left =5640 - Top =135 - Width =360 - Height =360 - TabIndex =1 - BorderColor =10921638 - Name ="chkIsSeedling" - AfterUpdate ="[Event Procedure]" - DefaultValue ="0" - GridlineColor =10921638 - - LayoutCachedLeft =5640 - LayoutCachedTop =135 - LayoutCachedWidth =6000 - LayoutCachedHeight =495 - Begin - Begin Label - OverlapFlags =85 - Left =4620 - Top =60 - Width =990 - Height =315 - BorderColor =8355711 - ForeColor =8355711 - Name ="lblIsSeedling" - Caption ="Seedling?" - GridlineColor =10921638 - LayoutCachedLeft =4620 - LayoutCachedTop =60 - LayoutCachedWidth =5610 - LayoutCachedHeight =375 - End - End - End Begin TextBox - Visible = NotDefault OverlapFlags =85 IMESentenceMode =3 - Left =1200 - Top =480 + Left =1020 + Top =60 Width =2850 Height =315 - TabIndex =2 BackColor =65535 BorderColor =10921638 ForeColor =4210752 - Name ="tbxCoverPct" + Name ="tbxWalkStartDate" + AfterUpdate ="[Event Procedure]" ConditionalFormat = Begin 0x010000009e000000020000000100000000000000000000001a00000001000000 , 0x00000000fff2000000000000030000001b0000001e0000000100000000000000 , @@ -837,10 +697,10 @@ Begin Form End GridlineColor =10921638 - LayoutCachedLeft =1200 - LayoutCachedTop =480 - LayoutCachedWidth =4050 - LayoutCachedHeight =795 + LayoutCachedLeft =1020 + LayoutCachedTop =60 + LayoutCachedWidth =3870 + LayoutCachedHeight =375 BackThemeColorIndex =-1 ConditionalFormat14 = Begin 0x01000200000001000000000000000100000000000000fff20000190000005b00 , @@ -850,44 +710,35 @@ Begin Form 0x00000000000000000000000000000000000000000000 End End - Begin Label - Visible = NotDefault + Begin CommandButton + Enabled = NotDefault OverlapFlags =85 - Left =120 - Top =480 - Width =990 - Height =315 - BorderColor =8355711 - ForeColor =8355711 - Name ="lblCoverPct" - Caption ="Cover %" - GridlineColor =10921638 - LayoutCachedLeft =120 - LayoutCachedTop =480 - LayoutCachedWidth =1110 - LayoutCachedHeight =795 - End - Begin Label - Visible = NotDefault - FontItalic = NotDefault - OverlapFlags =119 - Left =4140 - Top =480 - Width =1860 - Height =360 - FontSize =8 - FontWeight =500 - BorderColor =8355711 - ForeColor =16737792 - Name ="lblCoverPctHint" - Caption ="Cover pct hint" + Left =1020 + Top =540 + Width =2580 + TabIndex =1 + ForeColor =16711680 + Name ="btnAddSpecies" + Caption =" Add Species Found" + ControlTipText ="Add veg species found" GridlineColor =10921638 - LayoutCachedLeft =4140 - LayoutCachedTop =480 - LayoutCachedWidth =6000 - LayoutCachedHeight =840 + + LayoutCachedLeft =1020 + LayoutCachedTop =540 + LayoutCachedWidth =3600 + LayoutCachedHeight =900 ForeThemeColorIndex =-1 - ForeTint =100.0 + 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 @@ -911,7 +762,7 @@ Option Explicit ' ================================= ' Form: VegWalk ' Level: Application form -' Version: 1.04 +' Version: 1.05 ' Basis: Dropdown form ' ' Description: VegWalk form object related properties, functions & procedures for UI display @@ -926,6 +777,8 @@ Option Explicit ' BLC - 10/24/2016 - 1.03 - revised to accommodate VegPlot WCC, URC, ARC; & ' use UpsertRecord() ' BLC - 10/19/2017 - 1.04 - added comment length +' BLC - 11/26/2017 - 1.05 - display LU code & Utah sp vs ddSpecies column +' remove species info to VegSpecies ' ================================= '--------------------- @@ -940,6 +793,8 @@ Private m_Directions As String Private m_CallingForm As String Private m_FormContext As String +Private m_SaveOK As Boolean 'ok to save record (prevents bound form from immediately updating) + '--------------------- ' Event Declarations '--------------------- @@ -1013,7 +868,7 @@ End Property ' --------------------------------- ' Sub: Form_Open ' Description: form opening actions -' Assumptions: Veg walk species are noted as presence/absence only. Not % covers. +' Assumptions: Veg walk species entered via VegSpecies form, veg walk basic info here ' OpenArgs passes only the calling form name ' Parameters: - ' Returns: - @@ -1031,6 +886,8 @@ End Property ' BLC - 10/24/2016 - revise to accommodate VegPlot WCC, URC, ARC ' BLC - 1/10/2017 - revise to use s_events_by_site to avoid conflict w/ ' context (picking site that doesn't match context) +' BLC - 11/26/2017 - display LU code & Utah sp vs ddSpecies column +' remove species info to VegSpecies & add walk start date ' --------------------------------- Private Sub Form_Open(Cancel As Integer) On Error GoTo Err_Handler @@ -1064,65 +921,30 @@ On Error GoTo Err_Handler 'minimize calling form ToggleForm Me.CallingForm, -1 - 'set UI based on form context - Select Case Me.FormContext - - Case "VegWalk" - 'expose event, start date for VegWalk form - lblEvent.Visible = True - cbxEvent.Visible = True - btnAddEvent.Visible = True - - 'set list position & hide cover % UI - lblMsgIcon.Top = 0.375 * TWIPS_PER_INCH - lblMsg.Top = 0.5 * TWIPS_PER_INCH - rctList.Top = 0.6667 * TWIPS_PER_INCH - list.Top = 0.75 * TWIPS_PER_INCH - Me.Detail.Height = 3.875 * TWIPS_PER_INCH - lblCoverPct.Visible = False - tbxCoverPct.Visible = False - lblCoverPctHint.Visible = False - 'move form to force height change - Me.Move Me.WindowLeft, Height:=Me.FormHeader.Height + Me.Detail.Height - - Case "WoodyCanopySpecies", "UnderstoryRootedSpecies", "AllRootedSpecies" - 'hide event (already on VegPlot form) - lblEvent.Visible = False - cbxEvent.Visible = False - btnAddEvent.Visible = False - - 'drop list down & expose cover % UI - lblMsgIcon.Top = 0.6667 * TWIPS_PER_INCH - lblMsg.Top = 0.7917 * TWIPS_PER_INCH - rctList.Top = 0.9583 * TWIPS_PER_INCH - list.Top = 1.0417 * TWIPS_PER_INCH - Me.Detail.Height = 4.1667 * TWIPS_PER_INCH - lblCoverPct.Visible = True - tbxCoverPct.Visible = True - lblCoverPctHint.Visible = True - lblCoverPctHint.Caption = "nearest 1%" - 'move form to force height change - Me.Move Me.WindowLeft, Height:=Me.FormHeader.Height + Me.Detail.Height - End Select + 'expose event, start date for VegWalk form + lblEvent.Visible = True + cbxEventID.Visible = True + btnAddEvent.Visible = True 'set context - based on TempVars lblContext.ForeColor = lngLime lblContext.Caption = GetContext() - Title = IIf(strCaller = "VegPlot", strTitle, "VegWalk") + Title = "VegWalk" lblTitle.Caption = "" 'hide inner title - Directions = "Enter species found and click save." + Directions = "Enter veg walk info and click save. Then enter species found." tbxIcon.Value = StringFromCodepoint(uBullet) lblDirections.ForeColor = lngLtBlue btnComment.Caption = StringFromCodepoint(uComment) btnComment.ForeColor = lngBlue + btnSetObserverRecorder.Caption = StringFromCodepoint(uUsers) + btnSetObserverRecorder.ControlTipText = "Set the selected veg walk's observer & recorder" + btnSetObserverRecorder.ForeColor = lngBlue - btnAddUnknown.Caption = StringFromCodepoint(uQuestionMark) & Space(2) & "Add Unknown" btnAddEvent.Caption = StringFromCodepoint(uCalendarSpiral) & Space(2) & "Add Event" - btnSpeciesSearch.Caption = StringFromCodepoint(uMagnifierRight) & Space(2) & "Species" - btnAddUnknown.ForeColor = lngBlue + btnAddSpecies.Caption = StringFromCodepoint(uHerb) & Space(2) & "Add Species Found" btnAddEvent.ForeColor = lngBlue - btnSpeciesSearch.ForeColor = lngBlue + btnAddSpecies.ForeColor = lngBlue 'hints @@ -1130,15 +952,16 @@ On Error GoTo Err_Handler 'set hover btnComment.HoverColor = lngGreen - btnAddUnknown.HoverColor = lngGreen btnAddEvent.HoverColor = lngGreen - btnSpeciesSearch.HoverColor = lngGreen + btnSetObserverRecorder.HoverColor = lngGreen + btnAddSpecies.HoverColor = lngGreen 'defaults tbxIcon.ForeColor = lngRed + btnSetObserverRecorder.Enabled = False btnComment.Enabled = False btnSave.Enabled = False - cbxSpecies.BackColor = lngYellow + btnAddSpecies.Enabled = False 'determine level for events Dim Filter As String @@ -1151,24 +974,13 @@ On Error GoTo Err_Handler 'populate events ' Set cbxEvent.Recordset = GetRecords("s_events_by_park_river") - Set cbxEvent.Recordset = GetRecords(Filter) - cbxEvent.BoundColumn = 1 - cbxEvent.ColumnCount = 5 + Set cbxEventID.Recordset = GetRecords(Filter) + cbxEventID.BoundColumn = 1 + cbxEventID.ColumnCount = 5 ' cbxEvent.ColumnWidths = "0;0;0;0;2" - cbxEvent.ColumnWidths = "0;0;1in;0;0" - - 'populate species - ' ------------------------------------------------------------------------------------- - ' NOTE: s_enums_for_type *MUST* include "DISTINCT" for the combobox autoexpand to work!(Access bug) - ' Dan Some, August 7, 2011 - ' http://answers.microsoft.com/en-us/office/forum/office_2007-access/combo-box-property-auto-expand-yes-doesnt-seem-to/05fa61af-853e-4c9d-a3e3-2f51aa094668 - ' ------------------------------------------------------------------------------------- - Set cbxSpecies.Recordset = GetRecords("s_species_by_park") '.RowSource = GetTemplate("s_species_by_park") - cbxSpecies.BoundColumn = 1 'bind to label (not ID) - cbxSpecies.ColumnCount = 5 - cbxSpecies.ColumnHeads = True - cbxSpecies.ColumnWidths = "0;.7in;.2in;0;0" 'display the display column (combines label - summary) - + 'cols: ID, date, date-site-feat, site, feat + cbxEventID.ColumnWidths = "0;0;0;2in;0" + 'ID default -> value used only for edits of existing table values tbxID.Value = 0 @@ -1190,6 +1002,9 @@ On Error GoTo Err_Handler 'initialize values ClearForm Me + 'start @ eventID control + cbxEventID.SetFocus + Exit_Handler: Exit Sub Err_Handler: @@ -1248,6 +1063,12 @@ Private Sub Form_Current() On Error GoTo Err_Handler ' If tbxID > 0 Then btnComment.Enabled = True + 'enable add species, observer/recorder, comment if ID > 0 + If tbxID > 0 Then + btnComment.Enabled = True + btnSetObserverRecorder.Enabled = True + btnAddSpecies.Enabled = True + End If Exit_Handler: Exit Sub @@ -1261,22 +1082,23 @@ Err_Handler: End Sub ' --------------------------------- -' Sub: cbxEvent_AfterUpdate -' Description: Combobox after update actions +' Sub: cbxEventID_Exit +' Description: Combobox exit actions ' Assumptions: - ' Parameters: - ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, October 25, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, November 26, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 10/25/2016 - initial version +' BLC - 11/26/2017 - initial version ' --------------------------------- -Private Sub cbxEvent_AfterUpdate() +Private Sub cbxEventID_Exit(Cancel As Integer) On Error GoTo Err_Handler - - ReadyForSave + + 'set focus to detail controls + tbxWalkStartDate.SetFocus Exit_Handler: Exit Sub @@ -1284,28 +1106,36 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - cbxEvent_AfterUpdate[VegWalk form])" + "Error encountered (#" & Err.Number & " - cbxEventID_Exit[VegWalk form])" End Select Resume Exit_Handler End Sub ' --------------------------------- -' Sub: cbxSpecies_AfterUpdate +' Sub: cbxEventID_AfterUpdate ' Description: Combobox after update actions ' Assumptions: - ' Parameters: - ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, August 2, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, October 25, 2016 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 8/2/2016 - initial version -' BLC - 10/25/2016 - revised to use ReadyForSave only +' BLC - 10/25/2016 - initial version +' BLC - 11/26/2017 - set walk start date default (before entered) +' to event date when chosen ' --------------------------------- -Private Sub cbxSpecies_AfterUpdate() +Private Sub cbxEventID_AfterUpdate() On Error GoTo Err_Handler - + + 'set walk start date default (if empty) + If Len(tbxWalkStartDate) = 0 Then + + tbxWalkStartDate = cbxEventID.Column(1) + + End If + ReadyForSave Exit_Handler: @@ -1314,25 +1144,25 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - cbxSpecies_AfterUpdate[VegWalk form])" + "Error encountered (#" & Err.Number & " - cbxEventID_AfterUpdate[VegWalk form])" End Select Resume Exit_Handler End Sub ' --------------------------------- -' Sub: chkIsSeedling_AfterUpdate +' Sub: tbxWalkStartDate_AfterUpdate ' Description: Checkbox after update actions ' Assumptions: - ' Parameters: - ' Returns: - ' Throws: none ' References: - -' Source/date: Bonnie Campbell, October 25, 2016 - for NCPN tools +' Source/date: Bonnie Campbell, November 26, 2017 - for NCPN tools ' Adapted: - ' Revisions: -' BLC - 10/25/2016 - initial version +' BLC - 11/26/2017 - initial version ' --------------------------------- -Private Sub chkIsSeedling_AfterUpdate() +Private Sub tbxWalkStartDate_AfterUpdate() On Error GoTo Err_Handler ReadyForSave @@ -1343,7 +1173,7 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - chkIsSeedling_AfterUpdate[VegWalk form])" + "Error encountered (#" & Err.Number & " - tbxWalkStartDate_AfterUpdate[VegWalk form])" End Select Resume Exit_Handler End Sub @@ -1391,56 +1221,24 @@ End Sub ' Revisions: ' BLC - 5/31/2016 - initial version ' BLC - 10/25/2016 - revised to use UpsertRecord() +' BLC - 11/26/2017 - updated to use m_SaveOK & ClearForm ' --------------------------------- Private Sub btnSave_Click() On Error GoTo Err_Handler + 'set enable btnSave_Click save + m_SaveOK = True + UpsertRecord Me - -' Dim vw As New VegWalk -' -' With vw -' 'values passed into form -' -' -'' .CollectionSourceName = "T" -' -'' .CreateDate = "" -'' .CreatedByID = 0 -'' .LastModified = "" -'' .LastModifiedByID = 0 -' -' '.ProtocolID = 1 -' '.SiteID = 1 -' -' 'form values -' -' .EventID = cbxEvent.Column(0) -'' .FeatureID = cbxFeature.Column(0) -' -' ' .Species = cbxSpecies.Value -' -' -' -' .ID = tbxID.Value '0 if new, edit if > 0 -' .SaveToDb -' -' 'set the tbxID.value -' tbxID = .ID -' -' End With -' -' 'clear values & refresh display -' -' ReadyForSave -' -' PopulateForm Me, tbxID.Value -' -' 'refresh list -' Me.list.Requery -' -' Me.Requery + Me![list].Form.Requery + + 'revert to disable non-btnSave_Click save + m_SaveOK = False + + 'clear fields + ClearForm Me + Exit_Handler: Exit Sub Err_Handler: @@ -1485,8 +1283,8 @@ Err_Handler: End Sub ' --------------------------------- -' Sub: btnAddUnknown_Click -' Description: Woody Canopy Cover button click actions +' Sub: btnAddVegSpecies_Click +' Description: Add Veg Species button click actions ' Assumptions: - ' Parameters: - ' Returns: - @@ -1497,11 +1295,11 @@ End Sub ' Revisions: ' BLC - 8/2/2016 - initial version ' --------------------------------- -Private Sub btnAddUnknown_Click() +Private Sub btnAddVegSpecies_Click() On Error GoTo Err_Handler 'open form - DoCmd.OpenForm "Unknown", acNormal, , , , , Me.Name + DoCmd.OpenForm "VegSpecies", acNormal, , , , , Me.Name Exit_Handler: Exit Sub @@ -1509,37 +1307,7 @@ Err_Handler: Select Case Err.Number Case Else MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - btnAddUnknown_Click[VegWalk form])" - End Select - Resume Exit_Handler -End Sub - -' --------------------------------- -' Sub: btnSpeciesSearch_Click -' Description: Woody Canopy Cover button click actions -' Assumptions: - -' Parameters: - -' Returns: - -' Throws: none -' References: - -' SoSpeciesSearche/date: Bonnie Campbell, August 2, 2016 - for NCPN tools -' Adapted: - -' Revisions: -' BLC - 8/2/2016 - initial version -' --------------------------------- -Private Sub btnSpeciesSearch_Click() -On Error GoTo Err_Handler - - 'open form - DoCmd.OpenForm "SpeciesSearch", acNormal, , , , , Me.Name - -Exit_Handler: - Exit Sub -Err_Handler: - Select Case Err.Number - Case Else - MsgBox "Error #" & Err.Number & ": " & Err.Description, vbCritical, _ - "Error encountered (#" & Err.Number & " - btnSpeciesSearch_Click[VegWalk form])" + "Error encountered (#" & Err.Number & " - btnAddVegSpecies_Click[VegWalk form])" End Select Resume Exit_Handler End Sub @@ -1650,6 +1418,7 @@ End Sub ' Revisions: ' BLC - 5/31/2016 - initial version ' BLC - 8/23/2016 - changed ReadyForSave() to public for mod_App_Data Upsert/SetRecord() +' BLC - 11/26/2017 - updated to enable Save when tbxID = 0 (new records only) ' --------------------------------- Public Sub ReadyForSave() On Error GoTo Err_Handler @@ -1660,35 +1429,26 @@ On Error GoTo Err_Handler isOK = False 'set color of icon depending on if values are set - 'requires: EventID, SiteID, FeatureID, - ' Species, IsSeedlingS - ' If Nz(cbxSpecies.Value, "") > -1 _ -' And Nz(chkIsSeedling.Value, "") > -1 _ -' And Nz(cbxEvent.Value, 0) > 0 Then - - Select Case Me.CallingForm - Case "VegPlot" - If Nz(cbxSpecies.Value, 0) > 0 _ - And Nz(tbxCoverPct.Value, 0) >= 0 Then - + 'requires: EventID, SiteID/FeatureID, WalkStartDate + + If IsDate(tbxWalkStartDate) _ + And Nz(cbxEventID.Value, 0) > 0 Then isOK = True - - End If - Case "VegWalk" - If Nz(cbxSpecies.Value, 0) > 0 _ - And Nz(cbxEvent.Value, 0) > 0 Then - - isOK = True - - End If - End Select + End If tbxIcon.ForeColor = IIf(isOK = True, lngDkGreen, lngRed) - btnSave.Enabled = isOK + 'enable save button only for new events (tbxID = 0) + If tbxID = 0 Then btnSave.Enabled = isOK 'refresh form - Me.Requery - +' Me.Requery + + 'enable add species, observer/recorder, comment if ID > 0 + If tbxID > 0 Then + btnComment.Enabled = True + btnSetObserverRecorder.Enabled = True + btnAddSpecies.Enabled = True + End If Exit_Handler: Exit Sub diff --git a/source/forms/VegWalkList.bas b/source/forms/VegWalkList.bas index 46c034d..7425f19 100644 --- a/source/forms/VegWalkList.bas +++ b/source/forms/VegWalkList.bas @@ -20,13 +20,15 @@ Begin Form Width =7860 DatasheetFontHeight =11 ItemSuffix =32 - Right =13155 - Bottom =11385 + Left =1065 + Top =3435 + Right =8700 + Bottom =7800 DatasheetGridlinesColor =14806254 RecSrcDt = Begin - 0x5614fef60dcbe440 + 0x34d35a973107e540 End - RecordSource ="VegWalkSpecies" + RecordSource ="VegWalk" Caption ="_List" OnCurrent ="[Event Procedure]" OnOpen ="[Event Procedure]" @@ -41,7 +43,7 @@ Begin Form AllowPivotTableView =0 AllowPivotChartView =0 AllowPivotChartView =0 - FilterOnLoad =0 + FilterOnLoad =255 ShowPageMargins =0 DisplayOnSharePointSite =1 AllowLayoutView =0 @@ -172,17 +174,17 @@ Begin Form OverlapFlags =85 Left =1560 Top =1020 - Width =1245 + Width =1500 Height =315 FontWeight =500 BorderColor =8355711 ForeColor =16777215 - Name ="lblSpecies" - Caption ="Species" + Name ="lblWalkStartDate" + Caption ="Walk Start Date" GridlineColor =10921638 LayoutCachedLeft =1560 LayoutCachedTop =1020 - LayoutCachedWidth =2805 + LayoutCachedWidth =3060 LayoutCachedHeight =1335 ForeThemeColorIndex =-1 ForeTint =100.0 @@ -206,27 +208,6 @@ Begin Form ForeThemeColorIndex =-1 ForeTint =100.0 End - Begin Label - OverlapFlags =85 - TextAlign =2 - Left =4620 - Top =1020 - Width =1245 - Height =315 - FontWeight =500 - BorderColor =8355711 - ForeColor =16777215 - Name ="lblIsSeedling" - Caption ="Seedling?" - ControlTipText ="Indicates if the species present is a seedling (not an adult)" - GridlineColor =10921638 - LayoutCachedLeft =4620 - LayoutCachedTop =1020 - LayoutCachedWidth =5865 - LayoutCachedHeight =1335 - ForeThemeColorIndex =-1 - ForeTint =100.0 - End End End Begin Section @@ -372,8 +353,8 @@ Begin Form TabIndex =3 BorderColor =10921638 ForeColor =4138256 - Name ="tbxSpecies" - ControlSource ="Master_PLANT_Code" + Name ="tbxWalkStartDate" + ControlSource ="WalkStartDate" GridlineColor =10921638 LayoutCachedLeft =1440 @@ -405,30 +386,6 @@ Begin Form LayoutCachedWidth =1380 LayoutCachedHeight =315 End - Begin TextBox - Enabled = NotDefault - OldBorderStyle =0 - OverlapFlags =85 - TextAlign =2 - BackStyle =0 - IMESentenceMode =3 - Left =4740 - Width =975 - Height =300 - TabIndex =5 - BorderColor =10921638 - ForeColor =4138256 - Name ="tbxIsSeedling" - ControlSource ="IsSeedling" - GridlineColor =10921638 - - LayoutCachedLeft =4740 - LayoutCachedWidth =5715 - LayoutCachedHeight =300 - ForeThemeColorIndex =2 - ForeTint =100.0 - ForeShade =50.0 - End End End Begin FormFooter @@ -460,6 +417,8 @@ Option Explicit ' References: - ' 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/26/2017 - 1.02 - revised to list veg walk info vs. species +' VegSpecies added to cover them ' ================================= '--------------------- @@ -564,6 +523,8 @@ End Property ' Adapted: - ' Revisions: ' BLC - 5/31/2016 - initial version +' BLC - 11/26/2017 - revised to list veg walk info vs. species +' VegSpecies added to cover them ' --------------------------------- Private Sub Form_Open(Cancel As Integer) On Error GoTo Err_Handler diff --git a/source/modules/mod_App_Enum.bas b/source/modules/mod_App_Enum.bas index f18f18a..6bef904 100644 --- a/source/modules/mod_App_Enum.bas +++ b/source/modules/mod_App_Enum.bas @@ -199,7 +199,7 @@ Public Enum TaglineType WRS = 83 rs = 84 V = 85 - G = 86 + g = 86 W = 87 R = 88 D = 89 diff --git a/source/queries/usys_temp_qdf.bas b/source/queries/usys_temp_qdf.bas index d10abc9..3dd81f6 100644 --- a/source/queries/usys_temp_qdf.bas +++ b/source/queries/usys_temp_qdf.bas @@ -1,9 +1,7 @@ -dbMemo "SQL" ="PARAMETERS eventyr Long;\015\012SELECT w.ID, w.Label AS SubstrateClass, w.Code, " - "w.DiameterRange_mm AS [Size], w.ActiveYear, w.RetireYear, w.Label + ' ('+ w.Code" - " +')' AS category\015\012FROM ModWentworthScale AS w\015\012WHERE (\015\012(w.Ac" - "tiveYear = [eventyr]) \015\012OR\015\012(w.RetireYear = [eventyr])\015\012OR\015" - "\012(w.ActiveYear <[eventyr]) \015\012AND \015\012((w.RetireYear IS NULL) OR ([e" - "ventyr] < w.RetireYear))\015\012)\015\012ORDER BY w.CategoryOrder;\015\012" +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 "Connect" ="" dbBoolean "ReturnsRecords" ="-1" dbInteger "ODBCTimeout" ="60" diff --git a/source/relations/{3D4797DA-2E71-4099-A138-C67ECA477F31}.txt b/source/relations/{3D4797DA-2E71-4099-A138-C67ECA477F31}.txt new file mode 100644 index 0000000..577acac --- /dev/null +++ b/source/relations/{3D4797DA-2E71-4099-A138-C67ECA477F31}.txt @@ -0,0 +1,8 @@ +256 +{3D4797DA-2E71-4099-A138-C67ECA477F31} +tsys_Link_Files +tsys_Link_Tables +Field = Begin +Link_type +LinkType +End diff --git a/source/tables/AppEnum.txt b/source/tables/AppEnum.txt new file mode 100644 index 0000000..c0a8d40 --- /dev/null +++ b/source/tables/AppEnum.txt @@ -0,0 +1,99 @@ +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 +13 DirectionFacing US 1 +14 DirectionFacing DS 2 +15 DirectionFacing RR 3 +16 DirectionFacing RL 4 +17 TransducerType US 1 +18 TransducerType DS 2 +19 TransducerType Air 3 +20 River CAC Colorado Above Confluence 1 +21 River CBC Colorado Below Confluence 2 +22 River Green Green 3 +23 River GAC Green Above Confluence 4 +24 River GBC Green Below Confluence 5 +25 River Gunnison Gunnison 6 +26 River Yampa Yampa 7 +27 WentworthClassSize S 1 +28 WentworthClassSize FG 2 +29 WentworthClassSize MG 3 +30 WentworthClassSize CG 4 +31 WentworthClassSize SP 5 +32 WentworthClassSize LP 6 +33 WentworthClassSize SC 7 +34 WentworthClassSize LC 8 +35 WentworthClassSize B 9 +36 WentworthClassSize BED 10 +37 TaskType Site 1 +38 TaskType Feature 2 +39 TaskType Photo 3 +40 TaskType Transect 4 +41 TaskType Plot 5 +47 Status Opened 6 +48 Status InProgress 1 +49 Status Completed 2 +50 Status Deferred 3 +51 Priority Critical 1 +52 Priority High 2 +53 Priority Medium 3 +54 Priority Low 4 +55 SlopeChangeCause Debris 1 +56 SlopeChangeCause Ground 2 +57 SlopeChangeCause Rock 3 +58 SlopeChangeCause Veg 4 +59 SlopeChangeCause Water 5 +64 ModWentworthClassSize F Fines 1 +65 ModWentworthClassSize CL Clay 2 +66 ModWentworthClassSize LC Loam/Clay 3 +67 ModWentworthClassSize LO Loam 4 +68 ModWentworthClassSize SA Sand 5 +69 ModWentworthClassSize GR Gravel 6 +70 ModWentworthClassSize PE Pebble 7 +71 ModWentworthClassSize CO Cobble 8 +72 ModWentworthClassSize BL Boulder 9 +73 ModWentworthClassSize BR Bedrock, Hardpan 10 +74 Actions Observe 1 +75 Actions DataEntry 3 +76 Actions Verify 7 +77 Actions Certify 8 +78 Actions Download 5 +79 Actions Upload 4 +80 Actions Change 6 +81 Actions Record 2 +82 TaglineType H Headpin @ 0 1 +83 TaglineType WRS Water @ River Stake 2 +84 TaglineType RS River Stake (Total Length) 3 +85 TaglineType V Slope Change - Vegetation 4 +86 TaglineType G Slope Change - Ground 5 +87 TaglineType W Slope Change - Water 6 +88 TaglineType R Slope Change - Rock 7 +89 TaglineType D Slope Change - Debris 8 +90 PlantType herb 1 +91 PlantType shrub 2 +92 PlantType tree 3 +93 PlantType grass 4 +94 PlantType sedge 5 +95 PlantType other 6 +96 RegEx PhotoNumRegex ^P([0-9]|[A-C])([0-2][0-9]|[3][0-1])(\\d){4}$ 1 +97 SyntaxType T_SQL T-SQL 1 +98 SyntaxType Jet_SQL Jet SQL 2 +99 SyntaxType Text Text 3 +100 TransectNumber T1 1 +101 TransectNumber T2 2 +102 TransectNumber T3 3 +103 TransectNumber T4 4 +104 TransectNumber T5 5 +105 TransectNumber T6 6 +106 TransectNumber T7 7 +107 TransectNumber T8 8 diff --git a/source/tables/Tally.txt b/source/tables/Tally.txt new file mode 100644 index 0000000..11d0ac6 --- /dev/null +++ b/source/tables/Tally.txt @@ -0,0 +1,11 @@ +Num +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 diff --git a/source/tables/USysRibbons.txt b/source/tables/USysRibbons.txt new file mode 100644 index 0000000..3c2c878 --- /dev/null +++ b/source/tables/USysRibbons.txt @@ -0,0 +1,2 @@ +RibbonName RibbonXML +Export \n \n \n \n \n \n \n \n \n \n \n diff --git a/source/tables/tsys_App_Defaults.txt b/source/tables/tsys_App_Defaults.txt new file mode 100644 index 0000000..0ea0305 --- /dev/null +++ b/source/tables/tsys_App_Defaults.txt @@ -0,0 +1,3 @@ +ID Project Release_ID DataTimeframe UserName Park BackupPromptOnStartup BackupPromptOnExit CompactBEOnExit VerifyLinksOnStartup WebURL AppContactName AppContactOrg AppContactPhone AppContactEmail +1 BR16 1 2015 Campbell_Bonnie CANY 1 1 http://science.nature.nps.gov/im/units/ncpn/datamanagement.cfm Bonnie L. Campbell Northern Colorado Plateau Network 435-719-2343 bonnie_campbell@nps.gov +2 IR15 2015 Campbell_Bonnie CANY diff --git a/source/tables/tsys_Db_Templates.txt b/source/tables/tsys_Db_Templates.txt new file mode 100644 index 0000000..41792c7 --- /dev/null +++ b/source/tables/tsys_Db_Templates.txt @@ -0,0 +1,181 @@ +ID Version IsSupported FieldCheck FieldOK Context Syntax TemplateName DataScope Params Template Remarks Dependencies EffectiveDate RetireDate CreateDate CreatedBy_ID LastModified LastModifiedBy_ID +1 1 1 0 s_get_parks SQL s_get_parks SELECT ParkCode FROM Park WHERE IsActiveForProtocol = 1; 5/18/2016 +2 1 1 0 s_park_list SQL s_park_list SELECT ID, ParkCode FROM Park WHERE IsActiveForProtocol = 1 ORDER BY ParkCode ASC; 5/18/2016 +4 1 1 0 s_river_list SQL s_river_list PARAMETERS pkcode TEXT(4);\nSELECT River.ID, Segment\nFROM River LEFT JOIN Park AS p ON p.ID = River.Park_ID\nWHERE ParkCode = [pkcode]\nORDER BY Segment; Used to get river list for breadcrumb 5/19/2016 +5 1 1 0 s_site_list_active SQL s_site_list_active ParkCode:string PARAMETERS pkcode TEXT(4), seg TEXT(10);\nSELECT s.ID, SiteName + ' (' + SiteCode + ')' AS Site \nFROM ((Site s\nLEFT JOIN Park p ON p.ID = s.Park_ID)\nLEFT JOIN River r ON r.ID = s.River_ID)\nWHERE ParkCode = [pkcode]\nAND r.Segment = [seg]\nAND s.IsActiveForProtocol = 1 \nORDER BY SiteName ASC; Used for breadcrumb 5/19/2016 9/22/2016 +6 1 1 0 s_feature_list SQL s_feature_list pkcode:string PARAMETERS pkcode TEXT(4);\nSELECT f.ID, f.Feature, loc.LocationName, f.Location_ID FROM ((((Feature f\nLEFT JOIN Location loc ON loc.ID = f.Location_ID)\nLEFT JOIN Site_Feature sf ON sf.Feature_ID = f.ID )\nLEFT JOIN Site s ON s.ID = sf.Site_ID )\nLEFT JOIN Park p ON p.ID = s.Park_ID )\nWHERE p.ParkCode = [pkcode]\nAND s.IsActiveForProtocol = 1 \nORDER BY f.Feature ASC; Used to populate Feature list form 5/19/2016 +7 1 1 0 s_contact_list SQL s_contact_list SELECT DISTINCT ID, FirstName + ' ' + LastName as Name FROM Contact; Used in observer/recorder dropdowns 5/19/2016 +8 1 1 0 s_tagline SQL s_tagline SourceType:string|SourceID:integer SELECT * FROM Tagline \nWHERE LineDistanceSource = '[SourceType]' AND \nLineDistanceSource_ID = [SourceID]; 5/19/2016 +9 1 1 0 s_vegwalk SQL s_vegwalk strFamily:string|strSpecies:string SELECT [strFamily] AS Family, [strSpecies] AS Species, LU_Code, \n1 AS SeqNum \nFROM tlu_NCPN_Plants \nWHERE Master_Family NOT IN ('','Unknown') \nUNION ALL \nSELECT [strFamily] AS Family, [strSpecies] AS Species, LU_Code, \n2 AS SeqNum \nFROM tlu_NCPN_Plants \nWHERE Master_Family = 'Unknown'\nORDER BY SeqNum ASC; 5/24/2016 +10 1 1 0 s_protocol_info SQL s_protocol_info strWHERE:string SELECT ProtocolName, Version, EffectiveDate, RetireDate, LastModified FROM Protocol \n[strWHERE]; 5/25/2016 +12 1 1 0 s_get_river_segments SQL s_get_river_segments ParkCode:string SELECT Segment FROM River \nLEFT JOIN Park ON Park.ID = River.Park_ID \nWHERE ParkCode LIKE '[ParkCode]'; 5/25/2016 +13 1 1 0 s_sop_metadata SQL s_sop_metadata area:string SELECT Code, SOPnumber, Version, EffectiveDate FROM SOP \nWHERE LCASE(Code) = '[area]'\nAND RetireDate IS NULL; 5/26/2016 +14 1 1 0 s_transducer_bd SQL s_transducer_bd SELECT 'BD' AS Timing, ParkCode, Segment, SiteCode, SiteName, \nLogger.ID, SensorType, SensorNumber, SamplingOrder \nFROM (((Logger \nLEFT JOIN Site ON Site.ID = Logger.Site_ID) \nLEFT JOIN River ON River.ID = Site.River_ID) \nLEFT JOIN Park ON Park.ID = River.Park_ID) 5/27/2016 2/16/2017 1 +15 1 1 0 s_transducer_number SQL s_transducer_number xx 5/29/2016 +17 1 1 0 s_form_edit SQL s_form_edit tbl:string|id:long SELECT * FROM [tbl] WHERE ID = [id]; used in populateform() for edits 6/1/2016 +18 1 1 0 d_form_record SQL d_form_record tbl:string|id:long DELETE t.* \nFROM [tbl] t \nWHERE t.ID \nIN (SELECT TOP 1 ID FROM [tbl] WHERE ID = [id]); used in deleting records via list forms/subforms, limits deletion to 1 record only 6/1/2016 +19 1 1 0 i_tagline_record SQL i_tagline_record LineDistSource:string|LineDistSourceID:long|LineDistType:string|LineDistance:double|HeightType:string|Height:double INSERT INTO Tagline(LineDistanceSource, LineDistanceSource_ID, \nLineDistanceType, LineDistance_m, HeightType, Height_cm) VALUES \n('[LineDistSource]',[LineDistSourceID],\n'[LineDistType]',[LineDistance],'[HeightType]',[Height]); used in inserting tagline records 6/1/2016 +20 1 1 0 u_tagline_record SQL u_tagline_record LineDistSource:string|LineDistSourceID:long|LineDistType:string|LineDistance:double|HeightType:string|Height:double|ID:long UPDATE Tagline \nSET LineDistanceSource = '[LineDistSource]', \nLineDistanceSource_ID = [LineDistSourceID], \nLineDistanceType = '[LineDistType]', \nLineDistance_m = [LineDistance], \nHeightType = '[HeightType]', \nHeight_cm = [Height]\nWHERE ID = [ID]; used in updating tagline records 6/1/2016 +21 1 1 0 i_event_record SQL i_event_record ProtocolID:long|SiteID:long|LocationID:long|StartDate:string INSERT INTO Event(Protocol_ID, Site_ID, Location_ID, StartDate) VALUES ([ProtocolID],[SiteID],\n[LocationID],#[StartDate]#); +22 1 1 0 i_record_action SQL i_record_action RefTable:string|RefID:long|ID:long|action:string|ActionDate:string PARAMETERS RefTable TEXT(25), RefID LONG, ID LONG, Activity TEXT(2), ActionDate DATETIME;\nINSERT INTO RecordAction(ReferenceType, Reference_ID, Contact_ID, Activity, ActionDate) VALUES \n([RefTable],[RefID],\n[ID],[Activity], [ActionDate]); Add record action record for data entry, etc. 7/26/2016 +23 1 1 0 qsys_Linked_tables_not_in_tsys_Link_Tables SQL qsys_Linked_tables_not_in_tsys_Link_Tables SELECT MSysObjects.Name AS CurrTable, IIf([Type]=4,ParseConnectionStr([Connect]),ParseFileName([Database])) AS CurrDb, IIf([Type]=4,ParseConnectionStr([Connect],'SERVER=')) AS CurrServer, IIf([Type]=6,[Database]) AS CurrPath, IIf([Type]=4,True,False) AS ODBC\nFROM MSysObjects LEFT JOIN tsys_Link_Tables ON MSysObjects.Name = tsys_Link_Tables.LinkTable\nWHERE (((MSysObjects.Name) Not Like "~*") AND ((tsys_Link_Tables.LinkTable) Is Null) AND ((MSysObjects.Type) In (4,6))); Table linking checks 6/4/2016 +24 1 1 0 qsys_Linked_dbs_not_in_tsys_Link_Dbs SQL qsys_Linked_dbs_not_in_tsys_Link_Dbs INSERT INTO tsys_Link_Dbs ( Link_db, Server, File_path, Is_ODBC, Backups )\nSELECT qsys_Linked_tables_not_in_tsys_Link_Tables.CurrDb, qsys_Linked_tables_not_in_tsys_Link_Tables.CurrServer, qsys_Linked_tables_not_in_tsys_Link_Tables.CurrPath, qsys_Linked_tables_not_in_tsys_Link_Tables.ODBC, Not ([ODBC]) AS Backup\nFROM qsys_Linked_tables_not_in_tsys_Link_Tables LEFT JOIN tsys_Link_Dbs ON qsys_Linked_tables_not_in_tsys_Link_Tables.CurrDb = tsys_Link_Dbs.Link_db\nWHERE (((tsys_Link_Dbs.Link_db) Is Null))\nGROUP BY qsys_Linked_tables_not_in_tsys_Link_Tables.CurrDb, qsys_Linked_tables_not_in_tsys_Link_Tables.CurrServer, qsys_Linked_tables_not_in_tsys_Link_Tables.CurrPath, qsys_Linked_tables_not_in_tsys_Link_Tables.ODBC, Not ([ODBC]); Table linking checks 6/4/2016 +25 1 1 0 qsys_Linked_dbs_without_table_records SQL qsys_Linked_dbs_without_table_records SELECT tsys_Link_Dbs.*\nFROM tsys_Link_Dbs LEFT JOIN tsys_Link_Tables ON tsys_Link_Dbs.Link_db = tsys_Link_Tables.LinkDb\nWHERE (((tsys_Link_Tables.Link_db) Is Null)); Table linking checks 6/4/2016 +26 1 1 0 qsys_Linked_tables_mismatched_info SQL qsys_Linked_tables_mismatched_info Type:string|Connect:string|Database:string SELECT MSysObjects.Name AS CurrTable, tsys_Link_Tables.LinkTable, MSysObjects.Type, tsys_Link_Dbs.[IsODBC], IIf([Type]=4,ParseConnectionStr([Connect]),ParseFileName([Database])) AS CurrDb, tsys_Link_Tables.[LinkDb], IIf([Type]=4,ParseConnectionStr([Connect],'SERVER=')) AS CurrServer, tsys_Link_Dbs.Server, MSysObjects.Database AS CurrPath, tsys_Link_Dbs.[FilePath]\nFROM (tsys_Link_Dbs INNER JOIN tsys_Link_Tables ON tsys_Link_Dbs.[LinkDb]=tsys_Link_Tables.[LinkDb]) INNER JOIN MSysObjects ON MSysObjects.Name = tsys_Link_Tables.LinkTable\nWHERE MSysObjects.Type In (4,6)\nAND\n(\n(\nIIf([Type]=4,ParseConnectionStr([Connect]),ParseFileName([Database]))<>tsys_Link_Tables.[LinkDb]\nOR\nIIf([Type]=4,ParseConnectionStr([Connect],'SERVER='))<>[Server] \nOR\nMSysObjects.Database<>[FilePath]\n)\nOR\n(\nMSysObjects.Type=4\nAND\ntsys_Link_Dbs.[IsODBC]=False\n)\nOR\n(\nMSysObjects.Type=6 \nAND\ntsys_Link_Dbs.[IsODBC]=True\n)\nOR\n(\nIIf([Type]=4,ParseConnectionStr([Connect],'SERVER=')) IS NULL\nAND \ntsys_Link_Dbs.Server IS NOT NULL\n)\nOR\n( \nIIf([Type]=4,ParseConnectionStr([Connect],'SERVER=')) IS NOT NULL\nAND\ntsys_Link_Dbs.Server IS NULL\n) \nOR\n(\nMSysObjects.Database IS NULL\nAND \ntsys_Link_Dbs.[FilePath] IS NOT NULL\n)\n\nOR \n(\nMSysObjects.Database IS NOT NULL\nAND\ntsys_Link_Dbs.[FilePath] IS NULL\n)\n\n); Table linking checks 6/4/2016 +27 1 1 0 qsys_Linked_tables_mismatched_info_dbs SQL qsys_Linked_tables_mismatched_info_dbs Type:string|Connect:string|Database:string|FilePath:string|Server:string SELECT MSysObjects.Name AS CurrTable, tsys_Link_Tables.LinkTable, MSysObjects.Type, tsys_Link_Dbs.[IsODBC], IIf([Type]=4,ParseConnectionStr([Connect]),ParseFileName([Database])) AS CurrDb, tsys_Link_Tables.[LinkDb], IIf([Type]=4,ParseConnectionStr([Connect],'SERVER=')) AS CurrServer, tsys_Link_Dbs.Server, MSysObjects.Database AS CurrPath, tsys_Link_Dbs.[FilePath]\nFROM (tsys_Link_Dbs INNER JOIN tsys_Link_Tables ON tsys_Link_Dbs.[LinkDb]=tsys_Link_Tables.[LinkDb]) INNER JOIN MSysObjects ON MSysObjects.Name = tsys_Link_Tables.LinkTable\nWHERE MSysObjects.Type In (4,6)\nAND\n(\n(\nIIf([Type]=4,ParseConnectionStr([Connect]),ParseFileName([Database]))<>tsys_Link_Tables.[LinkDb]\nOR\nIIf([Type]=4,ParseConnectionStr([Connect],'SERVER='))<>[Server] \nOR\nMSysObjects.Database<>[FilePath]\n)\nOR\n(\nMSysObjects.Type=4\nAND\ntsys_Link_Dbs.[IsODBC]=False\n)\nOR\n(\nMSysObjects.Type=6 \nAND\ntsys_Link_Dbs.[IsODBC]=True\n)\nOR\n(\nIIf([Type]=4,ParseConnectionStr([Connect],'SERVER=')) IS NULL\nAND \ntsys_Link_Dbs.Server IS NOT NULL\n)\nOR\n( \nIIf([Type]=4,ParseConnectionStr([Connect],'SERVER=')) IS NOT NULL\nAND\ntsys_Link_Dbs.Server IS NULL\n) \nOR\n(\nMSysObjects.Database IS NULL\nAND \ntsys_Link_Dbs.[FilePath] IS NOT NULL\n)\n\nOR \n(\nMSysObjects.Database IS NOT NULL\nAND\ntsys_Link_Dbs.[FilePath] IS NULL\n)\n\n); Table linking checks 6/4/2016 6/20/2016 +28 1 1 0 qsys_Linked_tables_not_in_MSysObjects SQL qsys_Linked_tables_not_in_MSysObjects SELECT tsys_Link_Tables.LinkTable, tsys_Link_Tables.LinkDb, tsys_Link_Dbs.Server, tsys_Link_Dbs.FilePath\nFROM tsys_Link_Dbs INNER JOIN (MSysObjects RIGHT JOIN tsys_Link_Tables ON MSysObjects.Name = tsys_Link_Tables.LinkTable) ON tsys_Link_Dbs.LinkDb = tsys_Link_Tables.LinkDb\nWHERE (((MSysObjects.Name) Is Null)); Table linking checks 6/4/2016 +30 1 1 0 s_msysobjects_connect SQL s_msysobjects_connect Connect:string|LinkDb:string SELECT Name, Connect, \nParseConnectionStr([Connect]) AS CurrDb \nFROM MSysObjects \nWHERE ((MSysObjects.Name) Not Like '~*') AND \n((MSysObjects.Type) = 4) AND \n((ParseConnectionStr([Connect]) = '[LinkDb]')); Used in btnTestODBC_click 6/5/2016 +31 1 1 0 u_tsys_Link_Files_new_db SQL u_tsys_Link_Files_new_db NewPath:string|NewDb:string|DbName:string UPDATE tsys_Link_Files SET Link_File_Path = '[NewPath]', \nLink_file_name = '[NewDb]'\nWHERE Link_file_name = '[DbName]'; Used in btnUpdateLinks_Click 6/5/2016 +32 1 1 0 i_tsys_Logins_odbc SQL i_tsys_Logins_odbc username:string|action:string INSERT INTO dbo.tsys_Logins\nSELECT GETDATE() AS TimeStamp, '[username]' AS UserName, \n'[action]' AS ActionTaken; Used in AppSetup [mod_Initialize_App] 6/5/2016 +33 1 1 0 i_tsys_Logins SQL i_tsys_Logins username:string|action:string INSERT INTO tsys_Logins ( UserName, ActionTaken ) SELECT\n'[username]' AS User, '[action]' AS Action; Used in AppSetup [mod_Initialize_App] 6/5/2016 +34 1 1 0 d_tsys_link_tables SQL d_tsys_link_tables linktbl:string DELETE * \nFROM tsys_Link_Tables \nWHERE ([LinkTable]='[linktbl]'); Used in VerifyLinkTableInfo [mod_Linked_Tables] 6/5/2016 +35 1 1 0 i_tsys_link_tables SQL i_tsys_link_tables INSERT INTO tsys_Link_Tables \n( LinkTable, LinkDb ) \nSELECT qsys_Linked_tables_not_in_tsys_Link_Tables.CurrTable, \nqsys_Linked_tables_not_in_tsys_Link_Tables.CurrDb \nFROM qsys_Linked_tables_not_in_tsys_Link_Tables; Used in VerifyLinkTableInfo [mod_Linked_Tables] 6/5/2016 +36 1 1 0 s_tsys_link_tables_no_description SQL s_tsys_link_tables_no_description SELECT * FROM tsys_Link_Tables \nWHERE tsys_Link_Tables.DescriptionText Is Null; Used in VerifyLinkTableInfo [mod_Linked_Tables] 6/5/2016 +37 1 1 0 u_tsys_link_tables_description SQL u_tsys_link_tables_description descr:string|tbl:string UPDATE tsys_Link_Tables \nSET tsys_Link_Tables.DescriptionText='[descr]'\nWHERE (((tsys_Link_Tables.LinkTable)='[tbl]')); Used in VerifyLinkTableInfo [mod_Linked_Tables] 6/5/2016 +38 1 1 0 d_tsys_link_tables_by_db SQL d_tsys_link_tables_by_db link_db:string DELETE * FROM tsys_Link_Dbs \nWHERE ([LinkDb]='[link_db]'); Used in VerifyLinkTableInfo [mod_Linked_Tables] 6/5/2016 +39 1 1 0 s_msysobjects_except_deleted SQL s_msysobjects_except_deleted SELECT MSysObjects.Name, MSysObjects.Database \nFROM MSysObjects \nWHERE ((MSysObjects.Name) Not Like '~*') AND ((MSysObjects.Type) In (4,6)) \nORDER BY MSysObjects.Name; Used in VerifyLinks [mod_Linked_Tables] 6/5/2016 +40 1 1 0 u_tsys_link_dbs_filepath SQL u_tsys_link_dbs_filepath curDbPath:string|curDb:string UPDATE tsys_Link_Dbs \nSET FilePath = '[curDbPath]'\nWHERE LinkDb = '[curDb]'; Used in FixLinkedDatabase [mod_Linked_Tables] 6/5/2016 +41 1 1 0 s_tsys_link_tables_by_dbname SQL s_tsys_link_tables_by_dbname dbName:string SELECT * FROM tsys_Link_Tables \nWHERE [tsys_Link_Tables]![LinkDb] = '[DbName]'; Used in RefreshLinks[mod_Linked_Tables] 6/5/2016 +42 1 1 0 s_access_level SQL s_access_level lvl:string PARAMETERS lvl TEXT(15);\nSELECT ID FROM Access\nWHERE LCASE(AccessLevel) = [lvl]; Used in AccessID() [mod_User] 6/7/2016 +43 1 1 0 i_contact SQL i_contact_old FirstName:string|LastName:string|email:string|org:string|MI:string|username:string|WorkPhone:string|WorkExt:string|position:string|IsActive:byte INSERT INTO Contact(FirstName, LastName, Email, Organization,\nMiddleInitial, Username, WorkPhone, WorkExtension, PositionTitle, IsActive) \nVALUES\n('[FirstName]','[LastName]','\n[email]','[org]','\n[MI]','[username]','\n[WorkPhone]','[WorkExt]','[position]',[IsActive]); Used in SaveToDb [cls_Person] 6/7/2016 +44 1 1 0 i_contact_access SQL i_contact_access contactID:long|accessID:long PARAMETERS ContactID INT, AccessID INT;\nINSERT INTO Contact_Access (Contact_ID, Access_ID)\nVALUES\n([ContactID],[AccessID]); Used in SaveToDb[cls_Person] 6/7/2016 +45 1 1 0 i_usys_temp_table SQL i_usys_temp_table i:integer INSERT INTO usys_temp_table(Num) VALUES ([i]); Used in CreateTempTable[mod_Db] 6/8/2016 +47 1 1 0 s_usys_temp_table SQL s_usys_temp_table SELECT * FROM usys_temp_table; Used in reports w/o underlying dataset that require detail section duplication 6/8/2016 +48 1 1 0 d_usys_temp_table SQL d_usys_temp_table DELETE FROM usys_temp_table; Clears usys_temp_table used in CreateTempTable[mod_Db] 6/8/2016 +49 1 1 0 s_cover_species_by_year SQL s_cover_species_by_year SampleYear:integer|ParkCode:string|RiverSegment:string|SpeciesType:string SELECT DISTINCT ParkCode, Segment, Year(StartDate) AS LastYr,\nMaster_Species, mp.LU_Code, sp.PercentCover \nFROM (((((Park p\nLEFT OUTER JOIN River r ON r.Park_ID = p.ID)\nLEFT OUTER JOIN Site s ON s.Park_ID = p.ID)\nLEFT OUTER JOIN Event e ON e.Site_ID = s.ID)\nLEFT OUTER JOIN VegPlot v ON v.Event_ID = e.ID)\nLEFT OUTER JOIN [SpeciesType] sp ON sp.VegPlot_ID = v.ID)\nLEFT OUTER JOIN tlu_NCPN_Plants mp ON mp.Master_PLANT_Code = sp.Master_PLANT_Code\nWHERE\nYear(StartDate) = [SampleYear]\nAND\nParkCode = '[ParkCode]'\nAND\nSegment = '[RiverSegment]'\nAND s.IsActiveForProtocol = 1\nAND p.IsActiveForProtocol = 1\nORDER BY PercentCover DESC,Master_Species ASC; Used as initial dataset for WCC, URC, ARS species lists. 6/10/2016 +50 1 1 0 s_plant_species_by_lucode SQL s_plant_species_by_lucode lucode:string SELECT DISTINCT TOP 1 Master_Family, Master_PLANT_Code, Master_Species, UT_Family, CO_Family, WY_Family, Utah_PLant_Code,\nUtah_Species, CO_PLANT_Code, Co_Species,\nWy_PLANT_Code, Wy_Species, Master_Common_Name,\nLU_Code, Lifeform, Duration, Nativity\nFROM tlu_NCPN_plants WHERE LU_Code = '[lucode]'; Used in Species.Init(lucode) [cls_Species] 6/11/2016 +51 1 1 0 i_cover_species SQL i_cover_species tbl:string|vegplotID:integer|masterplantcode:string|pctcover:integer PARAMETERS VegPlotID LONG, MasterPlantCode TEXT(20),\nPctCover INTEGER;\nINSERT INTO tbl (VegPlot_ID, Master_PLANT_Code, PercentCover) VALUES \n([VegPlotID],[MasterPlantCode],[PctCover]); Used in Init() for species classes: RootedSpecies, WoodyCanopySpecies 6/11/2016 9/26/2016 +52 1 1 0 i_understory_species SQL i_understory_species_old vegplotID:integer|masterplantcode:string|pctcover:integer|isseedling:byte INSERT INTO UnderstorySpecies(VegPlot_ID, Master_PLANT_Code, PercentCover, IsSeedling) VALUES \n([VegPlotID],'[MasterPlantCode]',\n[PercentCover],[IsSeedling]); Used in Init() for UnderstorySpecies class 6/11/2016 +53 1 1 0 s_top_cover_species_by_year SQL s_top_cover_species_by_year SampleYear:integer|ParkCode:string|RiverSegment:string|SpeciesType:string SELECT DISTINCT TOP 15 ParkCode, Segment,\nMaster_Species, mp.LU_Code\nFROM\n(SELECT DISTINCT ParkCode, Segment, Year(StartDate) AS LastYr,\nMaster_Species, mp.LU_Code, sp.PercentCover \nFROM (((((Park p\nLEFT OUTER JOIN River r ON r.Park_ID = p.ID)\nLEFT OUTER JOIN Site s ON s.Park_ID = p.ID)\nLEFT OUTER JOIN Event e ON e.Site_ID = s.ID)\nLEFT OUTER JOIN VegPlot v ON v.Event_ID = e.ID)\nLEFT OUTER JOIN [SpeciesType] sp ON sp.VegPlot_ID = v.ID)\nLEFT OUTER JOIN tlu_NCPN_Plants mp ON mp.Master_PLANT_Code = sp.Master_PLANT_Code\nWHERE\nYear(StartDate) = [SampleYear]\nAND\nParkCode = '[ParkCode]'\nAND\nSegment = '[RiverSegment]'\nAND s.IsActiveForProtocol = 1\nAND p.IsActiveForProtocol = 1\nORDER BY PercentCover DESC,Master_Species ASC)\nWHERE Master_Species <> '' AND mp.LU_Code <> ''\nORDER BY Master_Species ASC; Used as dataset for WCC, URC, ARS species lists. 6/11/2016 +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 +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 +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 +66 1 1 0 i_feature SQL i_feature PARAMETERS LocID LONG, feat TEXT(2),\nDescr TEXT(255), Dirs TEXT(255);\nINSERT INTO Feature\n(Location_ID, Feature, FeatureDescription, FeatureDirections)\nVALUES\n([LocID],[feat],[Descr],[Dirs]); Used to insert feature records from Feature form 6/27/2016 10/17/2017 +67 1 1 0 u_feature SQL u_feature PARAMETERS FID LONG, LocID LONG, feat TEXT(2),\nDescr TEXT(255), Dirs TEXT(255);\nUPDATE Feature\nSET Location_ID = [LocID], \nFeature = [feat], \nFeatureDescription = [Descr], \nFeatureDirections = [Dirs]\nWHERE \nID = [FID]; Used to update feature records from Feature form 6/27/2016 10/17/2017 +68 1 1 0 i_site_feature SQL i_site_feature PARAMETERS FID LONG, SID LONG;\nINSERT INTO \nSite_Feature (Site_ID, Feature_ID)\nVALUES\n([SID],[FID]); Used to add site_feature records from Feature form 6/27/2016 +69 1 1 0 i_event SQL i_event PARAMETERS SID LONG, LID LONG, PID LONG, Start DATE;\nINSERT INTO Event (Site_ID, Location_ID, Protocol_ID, StartDate)\nVALUES\n([SID],[LID],[PID],[Start]); Used to add event records from Event form 6/27/2016 +70 1 1 0 u_event SQL u_event PARAMETERS SID LONG, LID LONG, PID LONG, Start DATE, EID LONG;\nUPDATE Event \nSET Site_ID = [SID], \nLocation_ID = [LID], \nProtocol_ID = [PID], \nStartDate = [Start] \nWHERE ID = [EID]\n; Used to update event records from Event form 6/27/2016 8/22/2016 +71 1 1 0 s_events_by_park_river SQL s_events_by_park_river pkcode:string|waterway:string PARAMETERS pkcode Text ( 4 ), waterway Text ( 25 );\nSELECT e.ID, s.SiteCode, s.SiteName, r.Segment, CStr(e.StartDate) + " - " + s.SiteName AS ddEvent\nFROM ((Event AS e INNER JOIN Site AS s ON s.ID = e.Site_ID) INNER JOIN Park AS p ON s.Park_ID = p.ID) INNER JOIN River AS r ON r.ID = s.River_ID\nWHERE p.ParkCode = [pkcode]\nAND r.River = [waterway]\nORDER BY s.SiteName, e.StartDate DESC; Used to retrieve event records for Event List form. 6/27/2016 +72 1 1 0 s_site_by_park_river SQL s_site_by_park_river pkcode:string|waterway:string PARAMETERS pkcode TEXT(4), waterway TEXT(25);\nSELECT DISTINCT s.ID, s.SiteCode, s.SiteName, s.SiteName + ' (' + s.SiteCode + ')' AS Site\nFROM ((Site s\nINNER JOIN Park p ON s.Park_ID = p.ID)\nINNER JOIN River r ON r.ID = s.River_ID)\nWHERE p.ParkCode = [pkcode]\nAND r.River = [waterway]\n; Used to populate site dropdown for Event form 6/27/2016 +73 1 1 0 s_location_by_park_river SQL s_location_by_park_river ParkCode:string|waterway:string PARAMETERS pkcode TEXT(4), waterway TEXT(25);\nSELECT DISTINCT l.ID, l.LocationName, l.CollectionSourceName, l.LocationType\nFROM ((((Location l\nINNER JOIN Event e ON e.Location_ID = l.ID)\nINNER JOIN Site s ON s.ID = e.Site_ID)\nINNER JOIN Park p ON s.Park_ID = p.ID)\nINNER JOIN River r ON r.ID = s.River_ID)\nWHERE p.ParkCode = [pkcode]\nAND r.River = [waterway]\n; Used to populate location dropdown for Event form 6/27/2016 +74 1 1 0 u_vegtransect SQL u_vegtransect PARAMETERS LocID LONG, EventID LONG, TransectNum TEXT(),\nVisit DATE;\nUPDATE VegTransect\nSET \nLocation_ID = [LocID], \nEvent_ID = [EventID], \nTransectNumber = [TransectNum], \nSampleDate = [Visit]\n; Used to update VegTransect record via VegTransect form 6/27/2016 +75 1 1 0 i_vegtransect SQL i_vegtransect PARAMETERS LocID LONG, EventID LONG, TransectNum TEXT(),\nVisit DATE;\nINSERT INTO VegTransect(Location_ID, Event_ID, TransectNumber, SampleDate)\nVALUES\n([LocID],[EventID],[TransectNum],[Visit])\n; Used to insert VegTransect record via VegTransect form 6/27/2016 +76 1 1 0 s_site_code_by_park_river SQL s_site_code_by_park_river pkcode:string|waterway:string PARAMETERS pkcode TEXT(4), waterway TEXT(25);\nSELECT s.ID, s.SiteCode\nFROM ((Site s \nINNER JOIN Park p ON s.Park_ID = p.ID)\nINNER JOIN River r ON r.ID = s.River_ID)\nWHERE p.ParkCode = [pkcode]\nAND r.River = [waterway]\n; Used to populate site dropdown for Event form 6/27/2016 +77 1 1 0 s_location_list_by_park_river SQL s_location_list_by_park_river ParkCode:string|waterway:string PARAMETERS pkcode TEXT(4), waterway TEXT(10);\nSELECT DISTINCT l.ID, l.LocationName, l.CollectionSourceName, l.LocationType\nFROM ((((Location l \nINNER JOIN Event e ON e.Location_ID = l.ID)\nINNER JOIN Site s ON s.ID = e.Site_ID)\nINNER JOIN Park p ON s.Park_ID = p.ID)\nINNER JOIN River r ON r.ID = s.River_ID)\nWHERE p.ParkCode = [pkcode]\nAND r.River = [waterway]\n; Used to populate location dropdown for Event form 6/27/2016 +78 1 1 0 s_events_list_by_park_river SQL s_events_list_by_park_river pkcode:string|waterway:string PARAMETERS pkcode TEXT(4), waterway TEXT(25);\nSELECT e.ID, e.SiteCode, e.SiteName, r.Segment\nFROM (((Event e \nINNER JOIN Site s ON s.ID = e.Site_ID)\nINNER JOIN Park p ON s.Park_ID = p.ID)\nINNER JOIN River r ON r.ID = s.River_ID)\nWHERE p.ParkCode = [pkcode]\nAND r.River = [waterway]\n; Used to populate Event list form +79 1 1 0 s_site_list_by_park_river SQL s_site_list_by_park_river ParkCode:string|waterway:string PARAMETERS pkcode TEXT(4), waterway TEXT(25);\nSELECT s.ID, SiteCode, SiteName, SiteDescription, SiteDirections, s.IsActiveForProtocol\nFROM ((Site s\nINNER JOIN Park p ON p.ID = s.Park_ID)\nINNER JOIN River r ON r.ID = s.River_ID)\nWHERE\np.ParkCode = [pkcode]\nAND r.River = [waterway]\n; Used for site list form 6/28/2016 +80 1 1 0 u_site_isactive_flag SQL u_site_isactive_flag IsActiveFlag:byte|ID:long PARAMETERS flag BYTE, sid LONG;\nUPDATE Site\nSET IsActiveForProtocol = [flag]\nWHERE ID = [sid]; Used to toggle Site IsActiveForProtocol flag 6/28/2016 10/24/2016 +81 1 1 0 s_site_list_by_park_river_segment SQL s_site_list_by_park_river_segment pkcode:string|waterway:string PARAMETERS pkcode TEXT(4), waterway TEXT(25);\nSELECT s.ID, s.SiteCode, s.SiteName, s.SiteDescription, s.SiteDirections, s.IsActiveForProtocol, s.River_ID, s.Park_ID \nFROM ((Site s\nINNER JOIN Park p ON p.ID = s.Park_ID)\nINNER JOIN River r ON r.ID = s.River_ID)\nWHERE\np.ParkCode = [pkcode]\nAND r.Segment = [waterway]\n; Used to populate Site list form 6/28/2016 +82 1 1 0 s_park_id SQL s_park_id PARAMETERS pkcode TEXT(4);\nSELECT ID FROM Park\nWHERE ParkCode = [pkcode]; Used to retrieve park ID when park code is known from breadcrumb context 6/28/2016 1/12/2017 +83 1 1 0 s_river_id SQL s_river_id PARAMETERS waterway TEXT(10);\nSELECT ID FROM River\nWHERE River = [waterway]; Used to retrieve river ID when river is known from breadcrumb context 6/28/2016 1/12/2017 +84 1 1 0 s_river_segment_id SQL s_river_segment_id PARAMETERS waterway TEXT(10);\nSELECT ID FROM River\nWHERE Segment = [waterway]; Used to retrieve river ID when river segment is known from breadcrumb context 6/28/2016 1/12/2017 +85 1 1 0 s_site_id_by_code SQL s_site_id_by_code PARAMETERS pkcode TEXT(4), scode TEXT(2);\nSELECT s.ID \nFROM (Site s\nINNER JOIN Park p ON p.ID = s.Park_ID)\nWHERE s.SiteCode = [scode]\nAND p.ParkCode = [pkcode]; Used to retrieve site ID from site and park codes 6/28/2016 6/28/2016 11/9/2017 +86 1 1 0 s_feature_id SQL s_feature_id pkcode:string|feat:string PARAMETERS pkcode TEXT(4), feat TEXT(2);\nSELECT f.ID \nFROM (((Feature f\nINNER JOIN Site_Feature sf ON sf.Feature_ID = f.ID)\nINNER JOIN Site s ON s.ID = sf.Site_ID)\nINNER JOIN Park p ON p.ID = s.Park_ID)\nWHERE f.Feature = [feat]\nAND p.ParkCode = [pkcode]\n; Used to retrieve feature ID from feature name and park code 6/28/2016 +87 1 1 0 i_site SQL i_site PARAMETERS parkid LONG, riverid LONG,\ncode TEXT(2), sname TEXT(50), dir TEXT(255), descr TEXT(255),\nflag BYTE;\nINSERT INTO Site(Park_ID, River_ID, SiteCode, SiteName,\nSiteDirections, SiteDescription,\nIsActiveForProtocol) \nVALUES\n([parkid],[riverid],[code],[sname],\n[dir],[descr],[flag]); Used to insert a site record via SaveToDb() Site class. Note parameters are limited to 255 char (dir may be truncated via parameter) 6/28/2016 +88 1 1 0 s_app_user SQL s_app_user SELECT c.ID, LastName +', '+ FirstName + ' ('+ UserName +')' AS AppUser, 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 UserName <> "" AND IsActive = 1\nORDER BY LastName, FirstName, Username; Used for dropdown on User form to identify person editing, entering data throughout the application 6/30/2016 +89 1 1 0 i_tsys_login_action SQL i_tsys_login_action PARAMETER environ_username TEXT(50),\naction TEXT(50);\nINSERT INTO tsys_Logins ( UserName, ActionTaken ) \nSELECT '[environ_username]' AS AppUser, '[action]' AS Action; Used to log application login & close 6/30/2016 +90 1 1 0 s_user_access SQL s_user_access PARAMETERS appuser TEXT(50);\nSELECT c.ID, LastName +', '+ FirstName + ' ('+ Username +')' AS AppUser, AccessLevel, IsActive, ca.Access_ID AS AccessLevelID\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 Username = [appuser]; Used to compare selected user access with user access for active directory user 6/30/2016 10/17/2016 1 +91 1 1 0 s_app_releases SQL s_app_releases SELECT tsys_App_Releases.ID, 'Version ' & [VersionNumber] & ' (' & [ReleaseDate] & ')' AS Version FROM tsys_App_Releases; Used in release dropdown on DbAdmin form 6/30/2016 +92 1 1 0 s_db_admin_info SQL s_db_admin_info SELECT\nProject, Release_ID, DataTimeframe,\nUserName, Park, BackupPromptOnStartUp, BackupPromptOnExit,CompactBEOnExit,\nWebURL, AppContactName, AppContactOrg, AppContactPhone, AppContactEmail,\nar.ReleaseDate, ar.IsSupported, DatabaseTitle, VersionNumber, FileName\nFROM (tsys_App_Defaults ad\nINNER JOIN tsys_App_Releases ar ON ar.ID = ad.Release_ID)\n; Used in DbAdmin form 6/30/2016 +93 1 1 0 s_tsys_datasheet_defaults SQL s_tsys_datasheet_defaults parkID:long PARAMETERS parkID LONG;\nSELECT dd.ID, dd.Park_ID, River_ID, CoverType, SpeciesRows, BlankRows,\nParkCode, River & "(" & Segment & ")" AS RiverSegment, Segment\nFROM ((tsys_datasheet_defaults dd\nINNER JOIN Park p ON p.ID = dd.Park_ID)\nINNER JOIN River r ON r.ID = dd.River_ID)\nWHERE\ndd.Park_ID = [parkID]\n; Used to list datasheet defaults via SetDatasheetDefaults form 7/1/2016 9/22/2016 +94 1 1 0 u_tsys_datasheet_defaults SQL u_tsys_datasheet_defaults PARAMETER ddid LONG, pid LONG, rid LONG, cover TEXT(3), species INTEGER, blanks INTEGER;\nUPDATE tsys_datasheet_defaults\nSET \nPark_ID = [pid], River_ID = [rid], CoverType = '[cover]', \nSpeciesRows = [species], BlankRows = [blanks]\nWHERE\nID = [ddid]; Used to update datasheet defaults via SetDatasheetDefaults form 7/1/2016 8/25/2016 +95 1 1 0 s_enums_for_type SQL s_enums_for_type etype:string PARAMETERS etype TEXT(25);\nSELECT DISTINCT id, label, summary, label & ' - ' & summary AS display, Sequence \nFROM AppEnum\nWHERE EnumType = [etype]\nORDER BY Sequence; Used to populate dropdowns where values are in enum table (NOTE: DISTINCT is required for combobox autoexpand to work) 7/13/2016 +96 1 1 0 s_event_by_park_river_w_location SQL s_event_by_park_river_w_location pkcode:string|waterway:string PARAMETERS pkcode TEXT(4), waterway TEXT(25);\nSELECT e.ID, s.SiteCode, e.Site_ID, s.SiteName, loc.LocationName, e.Location_ID, e.StartDate\nFROM ((((Event e\nINNER JOIN Site s ON s.ID = e.Site_ID)\nINNER JOIN Location loc ON loc.ID = e.Location_ID)\nINNER JOIN Park p ON p.ID = s.Park_ID)\nINNER JOIN River r ON r.ID = s.River_ID)\nWHERE\np.ParkCode = [pkcode]\nAND\nr.Segment = [waterway]\nORDER BY e.StartDate DESC, s.SiteName ASC, loc.LocationName ASC; Used for event list form 7/25/2016 +97 1 1 0 i_tsys_species_presence_by_park SQL i_tsys_species_presence_by_park INSERT INTO tsys_species_presence_by_park\nSELECT * FROM\n\n(SELECT DISTINCT \nMaster_Plant_Code, \nLU_Code,\nBLCA AS Presence, \n'BLCA' AS ParkCode,\n'CO' AS StateAbbr\nFROM tlu_NCPN_Plants\n\nUNION ALL\n\nSELECT DISTINCT \nMaster_Plant_Code, \nLU_Code,\nCANY AS Presence, \n'CANY' AS ParkCode,\n'UT' AS StateAbbr\nFROM tlu_NCPN_Plants\n\nUNION ALL\n\nSELECT DISTINCT \nMaster_Plant_Code, \nLU_Code,\nCURE AS Presence, \n'CURE' AS ParkCode,\n'UT' AS StateAbbr\nFROM tlu_NCPN_Plants\n\nUNION ALL\n\nSELECT DISTINCT \nMaster_Plant_Code, \nLU_Code,\n[DINO (UT)] AS Presence, \n'DINO' AS ParkCode,\n'UT' AS StateAbbr\nFROM tlu_NCPN_Plants\n\nUNION ALL\n\nSELECT DISTINCT \nMaster_Plant_Code, \nLU_Code,\n[DINO (CO)] AS Presence, \n'DINO' AS ParkCode,\n'CO' AS StateAbbr\nFROM tlu_NCPN_Plants\n\nWHERE \nLU_Code IS NOT NULL\nORDER BY LU_Code\n); Populates tsys_species_prescence_by_park & provides single column species presence 8/2/2016 +98 1 1 0 s_species_by_park SQL s_species_by_park PARAMETERS pkcode TEXT(4);\nSELECT DISTINCT \nt.Master_PLANT_Code,\nt.LU_Code,\np.Utah_species,\nt.LU_Code + " (" + p.Utah_species + ")" AS ddSpecies\nFROM tsys_species_presence_by_park t \nINNER JOIN tlu_NCPN_Plants p ON p.Master_PLANT_Code = t.Master_PLANT_Code\nWHERE \nt.LU_Code IS NOT NULL\nAND t.presence <>'NP'\nAND t.ParkCode = [pkcode]\nORDER BY t.LU_Code; Populates species dropdowns based on park presence (sp. Included if park presence <> NP) 8/2/2016 9/22/2016 +99 1 1 0 d_tsys_species_presence_by_park SQL d_tsys_species_presence_by_park DELETE * FROM tsys_species_presence_by_park; Clears tsys_species_presence_by_park so it can be updated w/ current data 8/2/2016 +100 1 1 0 s_top_rooted_species_last_year_by_park SQL s_top_rooted_species_last_year_by_park PARAMETERS pkcode TEXT(4);\nSELECT TOP 99 p.Master_Species, p.LU_Code, rs.Master_PLANT_Code, 0 AS SEQ \nFROM (((((RootedSpecies rs\nINNER JOIN tlu_NCPN_Plants p ON p.Master_PLANT_Code = rs.Master_PLANT_Code)\nINNER JOIN VegPlot v ON v.ID = rs.VegPlot_ID)\nINNER JOIN Event e ON e.ID = v.Event_ID)\nINNER JOIN Site s ON s.ID = v.Site_ID)\nINNER JOIN Park pk ON pk.ID = s.Park_ID)\nWHERE \np.LU_Code IS NOT NULL \nAND YEAR(e.StartDate) = YEAR(Date())-1\nAND pk.ParkCode = [pkcode]\nUNION ALL\nSELECT TOP 8 NULL AS Master_Species, NULL AS LU_Code, NULL AS Master_PLANT_Code, 1 AS SEQ \nFROM usys_temp_table\nORDER BY \nSEQ, LU_Code; Used to generate park specific rooted species for vegplot datasheets 8/22/2016 +101 1 1 0 s_top_understory_species_last_year_by_park SQL s_top_understory_species_last_year_by_park PARAMETERS pkcode TEXT(4);\nSELECT TOP 99 p.Master_Species, p.LU_Code, us.Master_PLANT_Code, us.IsSeedling, 0 AS SEQ \nFROM (((((UnderstorySpecies us\nINNER JOIN tlu_NCPN_Plants p ON p.Master_PLANT_Code = us.Master_PLANT_Code)\nINNER JOIN VegPlot v ON v.ID = us.VegPlot_ID)\nINNER JOIN Event e ON e.ID = v.Event_ID)\nINNER JOIN Site s ON s.ID = v.Site_ID)\nINNER JOIN Park pk ON pk.ID = s.Park_ID)\nWHERE \np.LU_Code IS NOT NULL \nAND YEAR(e.StartDate) = YEAR(Date())-1\nAND pk.ParkCode = [pkcode]\nUNION ALL\nSELECT TOP 8 NULL AS Master_Species, NULL AS LU_Code, NULL AS Master_PLANT_Code, NULL as IsSeedling, 1 AS SEQ \nFROM usys_temp_table\nORDER BY \nSEQ, LU_Code; Used to generate park specific understory species for vegplot datasheets 8/22/2016 +102 1 1 0 s_top_woody_species_last_year_by_park SQL s_top_woody_species_last_year_by_park PARAMETERS pkcode TEXT(4);\nSELECT TOP 99 p.Master_Species, p.LU_Code, ws.Master_PLANT_Code, 0 AS SEQ \nFROM (((((WoodyCanopySpecies ws\nINNER JOIN tlu_NCPN_Plants p ON p.Master_PLANT_Code = ws.Master_PLANT_Code)\nINNER JOIN VegPlot v ON v.ID = ws.VegPlot_ID)\nINNER JOIN Event e ON e.ID = v.Event_ID)\nINNER JOIN Site s ON s.ID = v.Site_ID)\nINNER JOIN Park pk ON pk.ID = s.Park_ID)\nWHERE \np.LU_Code IS NOT NULL \nAND YEAR(e.StartDate) = YEAR(Date())-1\nAND pk.ParkCode = [pkcode]\nUNION ALL\nSELECT TOP 8 NULL AS Master_Species, NULL AS LU_Code, NULL AS Master_PLANT_Code, 1 AS SEQ \nFROM usys_temp_table\nORDER BY \nSEQ, LU_Code; Used to generate park specific woody canopy species for vegplot datasheets 8/22/2016 +103 1 1 0 s_top_rooted_species_last_year_by_river SQL s_top_rooted_species_last_year_by_river PARAMETERS pkcode TEXT(4), waterway TEXT(10);\nSELECT TOP 99 p.Master_Species, p.LU_Code, rs.Master_PLANT_Code, 0 AS SEQ \nFROM ((((((RootedSpecies rs\nINNER JOIN tlu_NCPN_Plants p ON p.Master_PLANT_Code = rs.Master_PLANT_Code)\nINNER JOIN VegPlot v ON v.ID = rs.VegPlot_ID)\nINNER JOIN Event e ON e.ID = v.Event_ID)\nINNER JOIN Site s ON s.ID = v.Site_ID)\nINNER JOIN Park pk ON pk.ID = s.Park_ID)\nINNER JOIN River r ON r.Park_ID = pk.ID)\nWHERE \np.LU_Code IS NOT NULL \nAND YEAR(e.StartDate) = YEAR(Date())-1\nAND pk.ParkCode = [pkcode]\nAND r.Segment = [waterway]\nUNION ALL\nSELECT TOP 8 NULL AS Master_Species, NULL AS LU_Code, NULL AS Master_PLANT_Code, 1 AS SEQ \nFROM usys_temp_table\nORDER BY \nSEQ, LU_Code; Used to generate river segment specific rooted species for vegplot datasheets 8/22/2016 +104 1 1 0 s_top_understory_species_last_year_by_river SQL s_top_understory_species_last_year_by_river PARAMETERS pkcode TEXT(4), river TEXT(10);\nSELECT TOP 99 p.Master_Species, p.LU_Code, us.Master_PLANT_Code, us.IsSeedling, 0 AS SEQ \nFROM ((((((UnderstorySpecies us\nINNER JOIN tlu_NCPN_Plants p ON p.Master_PLANT_Code = us.Master_PLANT_Code)\nINNER JOIN VegPlot v ON v.ID = us.VegPlot_ID)\nINNER JOIN Event e ON e.ID = v.Event_ID)\nINNER JOIN Site s ON s.ID = v.Site_ID)\nINNER JOIN Park pk ON pk.ID = s.Park_ID)\nINNER JOIN River r ON r.Park_ID = pk.ID)\nWHERE \np.LU_Code IS NOT NULL \nAND YEAR(e.StartDate) = YEAR(Date())-1\nAND pk.ParkCode = [pkcode]\nAND r.Segment = [river]\nUNION ALL\nSELECT TOP 8 NULL AS Master_Species, NULL AS LU_Code, NULL AS Master_PLANT_Code, NULL as IsSeedling, 1 AS SEQ \nFROM usys_temp_table\nORDER BY \nSEQ, LU_Code; Used to generate river segment specific understory species for vegplot datasheets 8/22/2016 +105 1 1 0 s_top_woody_species_last_year_by_river SQL s_top_woody_species_last_year_by_river PARAMETERS pkcode TEXT(4), waterway TEXT(10);\nSELECT TOP 99 p.Master_Species, p.LU_Code, ws.Master_PLANT_Code, 0 AS SEQ \nFROM ((((((WoodyCanopySpecies ws\nINNER JOIN tlu_NCPN_Plants p ON p.Master_PLANT_Code = ws.Master_PLANT_Code)\nINNER JOIN VegPlot v ON v.ID = ws.VegPlot_ID)\nINNER JOIN Event e ON e.ID = v.Event_ID)\nINNER JOIN Site s ON s.ID = v.Site_ID)\nINNER JOIN Park pk ON pk.ID = s.Park_ID)\nINNER JOIN River r ON r.Park_ID = pk.ID)\nWHERE \np.LU_Code IS NOT NULL \nAND YEAR(e.StartDate) = YEAR(Date())-1\nAND pk.ParkCode = [pkcode]\nAND r.Segment = [waterway]\nUNION ALL\nSELECT TOP 8 NULL AS Master_Species, NULL AS LU_Code, NULL AS Master_PLANT_Code, 1 AS SEQ \nFROM usys_temp_table\nORDER BY \nSEQ, LU_Code; Used to generate river segment specific woody canopy species for vegplot datasheets 8/22/2016 +106 1 1 0 s_veg_walk_species_last_yr_by_park SQL s_veg_walk_species_last_yr_by_park PARAMETERS park TEXT(4);\nSELECT p.Master_Family, p.Master_Species, p.LU_Code, vw.Master_PLANT_Code, vw.IsSeedling, 0 AS SEQ \nFROM (((((VegWalkSpecies vw\nINNER JOIN tlu_NCPN_Plants p ON p.Master_PLANT_Code = vw.Master_PLANT_Code)\nINNER JOIN VegWalk v ON v.ID = vw.VegWalk_ID)\nINNER JOIN Event e ON e.ID = v.Event_ID)\nINNER JOIN Site s ON s.ID = e.Site_ID)\nINNER JOIN Park pk ON pk.ID = s.Park_ID)\nWHERE \np.LU_Code IS NOT NULL \nAND YEAR(e.StartDate) = YEAR(Date())-1\nAND pk.ParkCode = [park]\nUNION ALL\nSELECT TOP 8 NULL AS Master_Family, NULL AS Master_Species, NULL AS LU_Code, NULL AS Master_PLANT_Code, NULL as IsSeedling, 1 AS SEQ \nFROM usys_temp_table\nORDER BY \nSEQ, LU_Code; Used to generate park specific species for vegwalk datasheets 8/22/2016 +107 1 1 0 s_veg_walk_species_last_yr_by_river SQL s_veg_walk_species_last_yr_by_river PARAMETERS park TEXT(4), river TEXT(10);\nSELECT p.Master_Family, p.Master_Species, p.LU_Code, vw.Master_PLANT_Code, vw.IsSeedling, 0 AS SEQ \nFROM ((((((VegWalkSpecies vw\nINNER JOIN tlu_NCPN_Plants p ON p.Master_PLANT_Code = vw.Master_PLANT_Code)\nINNER JOIN VegWalk v ON v.ID = vw.VegWalk_ID)\nINNER JOIN Event e ON e.ID = v.Event_ID)\nINNER JOIN Site s ON s.ID = e.Site_ID)\nINNER JOIN Park pk ON pk.ID = s.Park_ID)\nINNER JOIN River r ON r.Park_ID = pk.ID)\nWHERE \np.LU_Code IS NOT NULL \nAND YEAR(e.StartDate) = YEAR(Date())-1\nAND pk.ParkCode = [park]\nAND r.Segment = [river]\nUNION ALL\nSELECT TOP 8 NULL AS Master_Family, NULL AS Master_Species, NULL AS LU_Code, NULL AS Master_PLANT_Code, NULL as IsSeedling, 1 AS SEQ \nFROM usys_temp_table\nORDER BY \nSEQ, LU_Code; Used to generate river segment specific species for vegwalk datasheets 8/22/2016 +108 1 1 0 s_datasheet_defaults_by_park SQL s_datasheet_defaults_by_park pkcode:string PARAMETERS pkcode TEXT(4);\nSELECT p.ParkCode, r.Segment, CoverType, SpeciesRows, BlankRows \nFROM (tsys_Datasheet_Defaults dd\nINNER JOIN Park p ON p.ID = dd.Park_ID)\nWHERE\np.ParkCode = [pkcode]; Used to determine # of species & blank rows for vegplot datasheets by park 8/22/2016 +109 1 1 0 s_datasheet_defaults_by_river SQL s_datasheet_defaults_by_river pkcode:string|waterway:string PARAMETERS pkcode TEXT(4), waterway TEXT(10);\nSELECT p.ParkCode, r.Segment, CoverType, SpeciesRows, BlankRows \nFROM ((tsys_Datasheet_Defaults dd\nINNER JOIN Park p ON p.ID = dd.Park_ID)\nINNER JOIN River r ON r.ID = dd.River_ID)\nWHERE\np.ParkCode = [pkcode]\nAND r.Segment = [waterway]; Used to determine # of species & blank rows for vegplot datasheets by river 8/22/2016 +110 1 1 0 i_login SQL i_login PARAMETERS uname TEXT(50), activity TEXT(50), accesslvl TEXT(25);\nINSERT INTO tsys_Logins(UserName, ActionTaken, ReleaseNumber, AccessLevel)\nVALUES\n([uname], [activity],[version],[accesslvl]); Records logins 8/23/2016 +111 1 1 0 u_cover_species SQL u_cover_species tbl:string|vegplotID:integer|masterplantcode:string|pctcover:integer UPDATE [tbl] \nSET\nVegPlot_ID = [VegPlotID], \nMaster_PLANT_Code = '[MasterPlantCode]', \nPercentCover) = [PercentCover]; Used to update for species classes: RootedSpecies, WoodyCanopySpecies 8/25/2016 +112 1 1 0 i_understory_species SQL i_understory_species PARAMETERS VPID LONG, code TEXT(20), pct DOUBLE, seedling BYTE;\nINSERT INTO UnderstorySpecies(VegPlot_ID, Master_PLANT_Code, PercentCover, IsSeedling) VALUES \n([VPID],[code],[pct],[seedling]); Used to insert understory cover species data 8/25/2016 +113 1 1 0 u_understory_species SQL u_understory_species PARAMETERS uid LONG, VPID LONG, code TEXT(20), pct DOUBLE, seedling BYTE;\nUPDATE UnderstorySpecies\nSET \nVegPlot_ID = [VPID], \nMaster_PLANT_Code = [code], \nPercentCover = [pct], \nIsSeedling = [seedling]\nWHERE ID = [uid]; Used to update understory cover species data 8/25/2016 +114 1 1 0 i_vegwalk_species SQL i_vegwalk_species PARAMETERS VWID LONG, code TEXT(20), seedling BYTE;\nINSERT INTO VegWalkSpecies(VegWalk_ID, Master_PLANT_Code, IsSeedling)\nVALUES\n([VWID],[code],[seedling]); Inserts veg walk species 8/25/2016 +115 1 1 0 u_vegwalk_species SQL u_vegwalk_species PARAMETERS vwsid LONG, VWID LONG, code TEXT(20), seedling BYTE;\nUPDATE VegWalkSpecies\nSET\nVegWalk_ID = [VWID], \nMaster_PLANT_Code = [code], \nIsSeedling = [seedling]\nWHERE ID = [vwsid]; Updates veg walk species 8/25/2016 +116 1 1 0 i_vegwalk SQL i_vegwalk PARAMETERS EID LONG, CPID LONG, coltype TEXT(50), start DATE, \nCID LONG, MID LONG;\nINSERT INTO VegWalk(Event_ID, CollectionPlace_ID, CollectionType, WalkStartDate, CreateDate, CreatedBy_ID, LastModified, LastModifiedBy_ID)\nVALUES\n([EID], [CPID], [coltype], [start], NOW, [CID], NOW, [MID]); Inserts veg walk record 8/25/2016 +117 1 1 0 u_vegwalk SQL u_vegwalk PARAMETERS vwid LONG, EID LONG, CPID LONG, coltype TEXT(50), start DATE, \nMID LONG;\nUPDATE VegWalk\nSET\nEvent_ID = [EID], CollectionPlace_ID = [CPID], CollectionType = [coltype], \nWalkStartDate = [start], \nLastModified = NOW, \nLastModifiedBy_ID = [MID]\nWHERE\nID = [vwid]; Updates veg walk record 8/25/2016 +118 1 1 0 i_transducer SQL i_transducer PARAMETERS EID LONG, ttype TEXT(1), tnum TEXT(10), sn TEXT(50), surveyed BYTE, tm TEXT(2), actdate DATE, acttime TIME;\nINSERT INTO Transducer (Event_ID, TransducerType, TransducerNumber, \nSerialNumber, IsSurveyed, Timing, ActionDate, ActionTime)\nVALUES\n([EID], [ttype], [tnum], [sn], [surveyed],[tm], [actdate], [acttime]); Inserts transducer record 8/25/2016 +119 1 1 0 u_transducer SQL u_transducer PARAMETERS tid LONG, EID LONG, ttype TEXT(1), tnum TEXT(10), sn TEXT(50), surveyed BYTE, tm TEXT(2), actdate DATE, acttime TIME;\nUPDATE Transducer \nSET\nEvent_ID = [EID], TransducerType = [ttype], TransducerNumber = [tnum], \nSerialNumber = [sn], IsSurveyed = [surveyed], Timing = [tm], \nActionDate = [actdate], ActionTime = [acttime]\nWHERE\nID = [tid]; Updates transducer record 8/25/2016 +120 1 1 0 i_tagline SQL i_tagline PARAMETERS ldsource TEXT(1), LDID LONG, ldtype TEXT(2), ld DECIMAL, \nhtype TEXT(3), h DECIMAL;\nINSERT INTO Tagline(LineDistanceSource, LineDistanceSource_ID, LineDistanceType, LineDistance_m, HeightType, Height_cm)\nVALUES\n([ldsource],[LDID],[ldtype],[ld],[htype],[h]); Inserts tagline record 8/25/2016 +121 1 1 0 u_tagline SQL u_tagline PARAMETERS tid LONG, ldsource TEXT(1), LDID LONG, ldtype TEXT(2), ld DECIMAL, \nhtype TEXT(3), h DECIMAL;\nUPDATE Tagline\nSET\nLineDistanceSource = [ldsource],\nLineDistanceSource_ID = [LDID],\nLineDistanceType = [ldtype],\nLineDistance_m = [ld],\nHeightType = [htype],\nHeight_cm = [h]\nWHERE\nID = [tid]; Updates tagline record 8/25/2016 +122 1 1 0 i_transducer_distance SQL i_transducer_distance PARAMETERS TID LONG, startpt TEXT(1), endpt TEXT(2), dist INTEGER;\nINSERT INTO TransducerDistance(Transducer_ID, StartPoint, EndPoint, Distance_cm)\nVALUES\n([TID],[startpt],[endpt],[dist]); Insert transducer distance record 8/25/2016 +123 1 1 0 u_transducer_distance SQL u_transducer_distance PARAMETERS tdid LONG, TID LONG, startpt TEXT(1), endpt TEXT(2), dist INTEGER;\nUPDATE TransducerDistance\nSET\nTransducer_ID = [TID],\nStartPoint = [startpt],\nEndPoint = [endpt],\nDistance_cm = [dist]\nWHERE\nID = [tdid]; Update transducer distance record 8/25/2016 +124 1 1 0 i_park SQL i_park PARAMETERS code TEXT(4), pk TEXT(50), st TEXT(2), isactive BYTE;\nINSERT INTO Park(ParkCode, ParkName, ParkState, IsActiveForProtocol)\nVALUES\n([code],[pk],[st],[isactive]); Insert park record 8/25/2016 +125 1 1 0 u_park SQL u_park PARAMETERS pkid LONG, code TEXT(4), pk TEXT(50), st TEXT(2), isactive BYTE;\nUPDATE Park\nSET\nParkCode = [code], ParkName = [pk], ParkState = [st], IsActiveForProtocol = [isactive]\nWHERE\nID = [pkid]; Update park record 8/25/2016 +126 1 1 0 i_vegplot SQL i_vegplot PARAMETERS EID LONG, SID LONG, FID LONG, TID LONG, MSSID LONG,\npnum INTEGER, pdist INTEGER, \npctfines DOUBLE, pctwater DOUBLE, \npctlitter DOUBLE, pctwd DOUBLE, \npctsd DOUBLE, pctfa DOUBLE, pctmss DOUBLE,\npctwcc DOUBLE, pcturc DOUBLE, pctarc DOUBLE,\npd INTEGER, bb BYTE,\nnocanopy BYTE, norooted BYTE, pctst DOUBLE, noindsp BYTE, \ncplot BYTE, rplot BYTE;\nINSERT INTO VegPlot(Event_ID, Site_ID, Feature_ID, VegTransect_ID,\nModalSedimentSize_ID, \nPlotNumber, PlotDistance_m, \nPctFines, PctWater, PctLitter, PctWoodyDebris,\nPctFilamentousAlgae,PctStandingDead,PctModalSedimentSize,\nWoodyCanopyPctCover, UnderstoryRootedPctCover, AllRootedPctCover,\nPlotDensity, BeaverBrowse,\nNoCanopyVeg, NoRootedVeg, PctSocialTrails, NoIndicatorSpecies,\nCalibrationPlot, ReplicatePlot)\nVALUES\n([EID],[SID],[FID],[TID],[MSSID],\n[pnum],[pdist],\n[pctfines],[pctwater],[pctlitter],[pctwd],[pctfa],[pctsd],[pctmss],\n[pctwcc],[pcturc],[pctarc],\n[pd],[bb],\n[nocanopy],[norooted],[pctst],[noindsp],[cplot],[rplot]); Insert veg plot record 8/25/2016 8/25/2016 12/5/2017 +127 1 1 0 u_vegplot SQL u_vegplot PARAMETERS vid LONG, EID LONG, SID LONG, FID LONG, TID LONG, MSSID LONG,\npnum INTEGER, pdist INTEGER, \npctfines DOUBLE, pctwater DOUBLE, \npctlitter DOUBLE, pctwd DOUBLE, \npctsd DOUBLE, pctfa DOUBLE, pctmss DOUBLE,\npctwcc DOUBLE, pcturc DOUBLE, pctarc DOUBLE,\npd INTEGER, bb BYTE,\nnocanopy BYTE, norooted BYTE, pctst DOUBLE, noindsp BYTE, \ncplot BYTE, rplot BYTE;\nUPDATE VegPlot\nSET\nEvent_ID = [EID], Site_ID = [SID], Feature_ID = [FID], VegTransect_ID = [TID],\nModalSedimentSize_ID = [MSSID], \nPlotNumber = [pnum], PlotDistance_m = [pdist], \nPctFines = [pctfines], PctWater = [pctwater], PctLitter = [pctlitter], PctWoodyDebris = [pctwd],\nPctFilamentousAlgae = [pctfa], PctModalSedimentSize = [pctmss], PctStandingDead = [pctsd],\nWoodyCanopyPctCover = [pctwcc], UnderstoryRootedPctCover = [pcturc], AllRootedPctCover = [pctarc],\nPlotDensity = [pd], BeaverBrowse = [bb],\nNoCanopyVeg = [nocanopy], NoRootedVeg = [norooted], PctSocialTrails = [pctst], NoIndicatorSpecies = [noindsp],\nCalibrationPlot = [cplot], ReplicatePlot = [rplot]\nWHERE\nID = [vid]; Update veg plot record 8/25/2016 8/25/2016 12/5/2017 +128 1 1 0 i_task SQL i_task PARAMETERS ttype TEXT(255), typeident LONG, descr TEXT(255),\nstat LONG, prio LONG, RID LONG, reqdate DATE, CID LONG, compldate DATE, LMID LONG;\nINSERT INTO Task(TaskType, TaskType_ID, Task, Status_ID, Priority_ID, RequestedBy_ID, RequestDate, CompletedBy_ID, CompleteDate, LastModifiedBy_ID, LastModified)\nVALUES\n([ttype],[typeident],[descr],[stat],[prio],[RID],[reqdate],[CID],[compldate],[LMID],Now); Insert task record 8/25/2016 +129 1 1 0 u_task SQL u_task PARAMETERS tid LONG, ttype TEXT(255), typeident LONG, descr TEXT(255),\nstat LONG, prio LONG, RID LONG, reqdate DATE, CID LONG, compldate DATE, LMID LONG;\nUPDATE Task\nSET\nTaskType = [ttype],\nTaskType_ID = [typeident],\nTask = [descr],\nStatus_ID = [stat],\nPriority_ID = [prio],\nRequestedBy_ID = [RID],\nRequestDate = [reqdate],\nCompletedBy_ID = [CID],\nCompleteDate = [compldate],\nLastModifiedBy_ID = [LMID],\nLastModified = Now\nWHERE\nID = [tid]; Update task record 8/25/2016 +130 1 1 0 u_task_complete SQL u_task_complete PARAMETERS tid LONG, CID LONG, complDate DATE, LMID LONG;\nUPDATE Task\nSET CompletedBy_ID = [CID],\nCompleteDate = [complDate],\nLastModifiedBy_ID = [LMID],\nLastModified = Now\nWHERE\nID = [tid]; Complete task record 8/25/2016 +131 1 1 0 i_comment SQL i_comment PARAMETERS comtype TEXT(255), ctid LONG, cmt TEXT(255), CID LONG, LMID LONG;\nINSERT INTO AppComment(CommentType, CommentType_ID, Comment, CreatedBy_ID, CreateDate, LastModifiedBy_ID, LastModified)\nVALUES\n([comtype],[ctid],[cmt],[CID],Now,[LMID],Now); Insert application comment 8/25/2016 12/6/2016 1 +132 1 1 0 u_comment SQL u_comment PARAMETERS acid LONG, comtype TEXT(255), ctid LONG, cmt TEXT(255), LMID LONG;\nUPDATE AppComment\nSET\nCommentType = [comtype],\nCommentType_ID = [ctid],\nComment = [cmt],\nLastModifiedBy_ID = [LMID],\nLastModified = Now\nWHERE\nID = [acid]; Update application comment 8/25/2016 +133 1 1 0 i_photo SQL i_photo PARAMETERS pdate DATE, ptype TEXT(2),\nphotogid LONG, digfname TEXT(50), NID TEXT(50),\npfacing TEXT(4), ploc TEXT(10), plocdesc TEXT(255),\nporient TEXT(255), sptid LONG, sloc TEXT(10),\ncloseup BYTE, replacemt BYTE, skip BYTE, inact LONG,\nlpupdate DATE, CID LONG,\n LMID LONG;\nINSERT INTO Photo(PhotoDate, PhotoType, Photographer_ID, DigitalFilename,\nNCPNImageID,PhotogFacing,PhotogLocation, PhotogLocationDesc, PhotogOrientation,\nSurveyPoint_ID,SubjectLocation,IsCloseup,IsReplacement,IsSkipped, InActive,\nLastPhotoUpdate,CreateDate,CreatedBy_ID,LastModified, LastModifiedBy_ID)\nVALUES\n([pdate],[ptype],[photogid],[digfname],[NID],[pfacing],[ploc],[plocdesc],[porient],[sptid],[sloc],[closeup],[replacemt],[skip],[inact],[lpupdate],Now,[CID],Now,[LMID]); Insert photo record 8/25/2016 +134 1 1 0 u_photo SQL u_photo PARAMETERS poid LONG, pdate DATE, ptype TEXT(2),\nphotogid LONG, digfname TEXT(50), NID TEXT(50),\npfacing TEXT(4), ploc TEXT(10), plocdesc TEXT(255),\nporient TEXT(255), sptid LONG, sloc TEXT(10),\ncloseup BYTE, replacemt BYTE, skip BYTE, inact LONG,\nlpupdate DATE, LMID LONG; \nUPDATE Photo\nSET\nPhotoDate = [pdate], PhotoType = [ptype],\nPhotographer_ID = [photogid], DigitalFilename = [digfname],\nNCPNImageID = [NID], PhotogFacing = [pfacing],\nPhotogLocation = [ploc], PhotogLocationDesc = [plocdesc],\nPhotogOrientation = [porient], SurveyPoint_ID = [sptid],\nSubjectLocation = [sloc], IsCloseup = [closeup],\nIsReplacement = [replacemt],\nIsSkipped = [skip],\nInActive = [inact],\nLastPhotoUpdate = [lpupdate],\nLastModified = Now,\nLastModifiedBy_ID = [LMID]\nWHERE\nID = [poid]; Update photo record 8/25/2016 +135 1 1 0 i_surveyfile SQL i_surveyfile PARAMETERS sfname TEXT(255), sfpath TEXT(255), stype TEXT(1),\nssource TEXT(4), tptid LONG, rptid LONG, teid LONG, beid LONG, seid LONG;\nINSERT INTO SurveyDataSourceFile(SourceFileName, SourceFilePath, SurveyType,\nSurveySource, TranslationPoint_ID, RotationPoint_ID, TranslationError_ID,\nRotationError_ID, BaseError_ID, SurveyError_ID)\nVALUES\n([sfname],[sfpath],[stype],[ssource],[tptid],[rptid],[teid],[reid],[beid],[seid]); Insert photo record 8/25/2016 9/26/2016 +136 1 1 0 u_surveyfile SQL u_surveyfile PARAMETERS sfid LONG, sfname TEXT(255), sfpath TEXT(255), stype TEXT(1),\nssource TEXT(4), tptid LONG, rptid LONG, teid LONG, beid LONG, seid LONG;\nUPDATE SurveyDataSourceFile\nSET\nSourceFileName = [sfname], SourceFilePath = [sfpath], SurveyType = [stype],\nSurveySource = [ssource], TranslationPoint_ID = [tptid], RotationPoint_ID = [rptid], TranslationError_ID = [teid],\nRotationError_ID = [reid], BaseError_ID = [beid], SurveyError_ID = [seid]\nWHERE\nID = [sfid]; Update photo record 8/25/2016 +137 1 1 0 i_surveypoint SQL i_surveypoint PARAMETERS ptname TEXT(255), ptype TEXT(4), x DOUBLE, y DOUBLE, z DOUBLE,\nptdescr TEXT(255), del BYTE;\nINSERT INTO SurveyPoint(PointName, PointType, XCoord, YCoord, ZCoord,\nPointDescription, IsDeleted)\nVALUES\n([ptname],[ptype],[x],[y],[z],[ptdescr],[del]); Insert survey point record 8/25/2016 +138 1 1 0 u_surveypoint SQL u_surveypoint PARAMETERS sid LONG, ptname TEXT(255), ptype TEXT(4), x DOUBLE, y DOUBLE, z DOUBLE, ptdescr TEXT(255), del BYTE;\nUPDATE SurveyPoint\nSET\nPointName = [ptname], PointType = [ptype], \nXCoord = [x], YCoord = [y], ZCoord = [z],\nPointDescription = [ptdescr], IsDeleted = [del]\nWHERE ID = [sid]; Update survey point record 8/25/2016 +139 1 1 0 i_surveypoint_error SQL i_surveypoint_error PARAMETERS etype TEXT(255), x DOUBLE, y DOUBLE, z DOUBLE;\nINSERT INTO SurveyPointError(ErrorType, XCoordError, YCoordError, ZCoordError)\nVALUES\n([etype],[x],[y],[z]); Insert survey point error 8/25/2016 +140 1 1 0 u_surveypoint_error SQL u_surveypoint_error PARAMETERS speid LONG, etype TEXT(255), x DOUBLE, y DOUBLE, z DOUBLE;\nUPDATE SurveyPointError\nSET\nErrorType = [etype], XCoordError = [x], YCoordError = [y], ZCoordError = [z]\nWHERE\nID = [speid]; Update survey point error 8/25/2016 +141 1 1 0 i_surveypoint_surveyfile SQL i_surveypoint_surveyfile PARAMETERS sfid LONG, sptid LONG;\nINSERT INTO\nSurveyDataSourceFile_SurveyPoint(SurveyDataSourceFile_ID, SurveyPoint_ID)\nVALUES\n([sfid],[sptid]); Insert survey point survey file record 8/25/2016 +142 1 1 0 i_usys_temp_photo SQL i_usys_temp_photo PARAMETERS ppath TEXT(255), pfile TEXT(255), pdate DATETIME, ptype TEXT(1);\nINSERT INTO usys_temp_photo(PhotoPath, PhotoFilename, PhotoDate, PhotoType)\nVALUES\n([ppath],[pfile],[pdate],[ptype]); Adds limited photo data while photo is added to db 8/30/2016 +143 1 1 0 u_usys_temp_photo SQL u_usys_temp_photo PARAMETERS iid LONG, ptype TEXT(1);\nUPDATE usys_temp_photo\nSET\nPhotoType = [ptype]\nWHERE\nID = [iid]; Updates photo data phototype 8/30/2016 +144 1 1 0 s_photo_data SQL s_photo_data SELECT \np.ID AS PhotoID, p.PhotoType, p.PhotoDate, p.Photographer_ID, p.PhotogFacing, p.PhotogLocation, p.PhotogOrientation, p.SubjectLocation, p.IsCloseup, p.IsReplacement, p.IsSkipped,\np.DigitalFilename as PhotoFilename, NULL as PhotoPath,\ne.StartDate, e.ID AS EventID,\nc.FirstName, c.LastName, c.FirstName & ' ' & c.LastName AS PhotogName, c.Email, \ns.SiteCode, s.ID AS SiteID, s.Park_ID, s.River_ID,\npk.ParkCode,\nr.River, r.Segment\nFROM ((((((Photo p\nINNER JOIN Event_Photo ep ON ep.Photo_ID = p.ID)\nINNER JOIN Event e ON e.ID = ep.Event_ID)\nINNER JOIN Contact c ON c.ID = p.Photographer_ID)\nINNER JOIN Site s ON s.ID = e.Site_ID)\nINNER JOIN River r ON r.ID = s.River_ID)\nINNER JOIN Park pk ON pk.ID = s.Park_ID)\nORDER BY p.PhotoType\n; Lists photo data including event, site, river, park, and photographer (contact) for populating photo treeview via mod_Treeview LoadTree(). 8/31/2016 +145 1 1 0 s_usys_temp_photo_data SQL s_usys_temp_photo_data SELECT \np.ID AS PhotoID, p.PhotoPath, p.PhotoFilename, p.PhotoType, p.PhotoDate, p.Photographer_ID, e.StartDate, p.Event_ID,\nc.FirstName, c.LastName, c.FirstName & ' ' & c.LastName AS PhotogName, c.Email,\ns.SiteCode, s.ID AS SiteID, s.Park_ID, s.River_ID,\npk.ParkCode,\nr.River, r.Segment\nFROM (((((usys_temp_photo p\nLEFT JOIN Event e ON e.ID = p.Event_ID)\nLEFT JOIN Contact c ON c.ID = p.Photographer_ID)\nLEFT JOIN Site s ON s.ID = e.Site_ID)\nLEFT JOIN River r ON r.ID = s.River_ID)\nLEFT JOIN Park pk ON pk.ID = s.Park_ID)\nORDER BY\np.PhotoType\n; Lists temporary photo data including event, site, river, park and photographer (contact) for populating photo treeview via mod_Treeview LoadTreeview() 8/31/2016 +146 1 1 0 s_feature_list_by_site SQL s_feature_list_by_site PARAMETERS pkcode TEXT(4), scode TEXT(2);\nSELECT f.ID, f.Feature, loc.LocationName, f.Location_ID FROM ((((Feature f\nLEFT JOIN Location loc ON loc.ID = f.Location_ID)\nLEFT JOIN Site_Feature sf ON sf.Feature_ID = f.ID )\nLEFT JOIN Site s ON s.ID = sf.Site_ID )\nLEFT JOIN Park p ON p.ID = s.Park_ID )\nWHERE p.ParkCode = [pkcode]\nAND s.SiteCode = [scode]\nAND s.IsActiveForProtocol = 1 \nORDER BY f.Feature ASC; Used to list features in breadcrumb 9/7/2016 +147 1 1 0 s_record_action_by_refID SQL s_record_action_by_refID PARAMETERS reftype TEXT(25), refID LONG;\nSELECT ra.ID, ra.Contact_ID, ra.Activity, ra.ActionDate, \nc.FirstName + ' ' + c.LastName AS ContactName\nFROM RecordAction ra\nLEFT JOIN Contact c ON c.ID = ra.Contact_ID\nWHERE\nra.ReferenceType = [reftype]\nAND\nra.Reference_ID = [refID]; Lists contact, action & dates for set observer / recorder list form 9/9/2016 +148 1 1 0 s_events_by_site SQL s_events_by_site PARAMETERS pkcode TEXT(4), scode TEXT(2);\nSELECT DISTINCT\ne.ID, \ne.StartDate,\ne.StartDate & ' - ' & s.SiteCode as SiteEventDate,\ne.StartDate & ' - ' & s.SiteName & ' (' & s.SiteCode & ')' as SiteNameEventDate,\ns.SiteCode,\np.ParkCode\nFROM ((Event e\nINNER JOIN Site s ON s.ID = e.Site_ID)\nINNER JOIN Park p ON p.ID = s.Park_ID)\nWHERE \ns.SiteCode = [scode]\nAND\np.ParkCode = [pkcode]\nORDER BY e.StartDate DESC; Events listing by site (CANY/DINO) or if no feature is selected (BLCA) 9/13/2016 1/10/2017 +149 1 1 0 s_events_by_feature SQL s_events_by_feature PARAMETERS pkcode TEXT(4), scode TEXT(2), feat TEXT(2);\nSELECT DISTINCT\ne.ID, \ne.StartDate,\nf.Feature & '-' & e.StartDate as FeatureEventDate,\ne.StartDate & ' - ' & s.SiteName & ' - ' & f.Feature as FeatureNameEventDate,\ns.SiteCode,\nf.Feature,\np.ParkCode\nFROM ((((Event e\nINNER JOIN Site s ON s.ID = e.Site_ID)\nINNER JOIN Park p ON p.ID = s.Park_ID)\nINNER JOIN Site_Feature sf ON sf.Site_ID = s.ID)\nINNER JOIN Feature f ON f.ID = sf.Feature_ID)\nWHERE \np.ParkCode = [pkcode]\nAND\ns.SiteCode = [scode]\nAND\nf.Feature = [feat]; Events listing by feature (BLCA) 9/13/2016 1/10/2017 +150 1 1 0 s_modal_sediment_size SQL s_modal_sediment_size SELECT \nae.ID,\nae.EnumType,\nae.Label,\nae.Summary\nFROM AppEnum ae\nWHERE ae.EnumType = 'ModWentworthClassSize'\nORDER BY ae.Sequence; Modified Wentworth Class Size values 9/13/2016 +151 1 1 0 s_vegtransect_by_site SQL s_vegtransect_by_site PARAMETERS pkcode TEXT(4), scode TEXT(2);\nSELECT DISTINCT\nvt.Location_ID,\nvt.Event_ID,\nvt.TransectNumber,\nvt.SampleDate,\nvt.TransectNumber + ' - ' + s.SiteName AS TransectSite,\ne.StartDate,\ns.SiteCode,\np.ParkCode\nFROM (((VegTransect vt\nINNER JOIN Event e ON e.ID = vt.Event_ID)\nINNER JOIN Site s ON s.ID = e.Site_ID)\nINNER JOIN Park p ON p.ID = s.Park_ID)\nWHERE \np.ParkCode = [pkcode]\nAND\ns.SiteCode = [scode]; VegTransect listing by site (CANY) or if no feature is selected (BLCA), (DINO no transects) 9/13/2016 1/11/2017 +152 1 1 0 s_vegtransect_by_feature SQL s_vegtransect_by_feature PARAMETERS pkcode TEXT(4), scode TEXT(2), feat TEXT(2);\nSELECT DISTINCT\nvt.Location_ID,\nvt.Event_ID,\nvt.TransectNumber,\nvt.SampleDate,\nvt.TransectNumber + ' - ' + s.SiteName + ' - ' + f.Feature AS TransectSiteFeature,\ne.StartDate,\nf.Feature,\ns.SiteCode,\np.ParkCode\nFROM (((((VegTransect vt\nINNER JOIN Event e ON e.ID = vt.Event_ID)\nINNER JOIN Feature_VegTransect fvt ON vt.ID = fvt.VegTransect_ID)\nINNER JOIN Feature f ON f.ID = fvt.Feature_ID)\nINNER JOIN Site s ON s.ID = e.Site_ID)\nINNER JOIN Park p ON p.ID = s.Park_ID)\nWHERE \np.ParkCode = [pkcode]\nAND\ns.SiteCode = [scode]\nAND\nf.Feature = [feat]; VegTransect listing by feature (BLCA) 9/13/2016 1/11/2017 +153 1 1 0 s_vegplot_by_site SQL s_vegplot_by_site PARAMETERS pkcode TEXT(4), scode TEXT(2);\nSELECT DISTINCT\nvp.PlotNumber,\nvp.PlotDistance_m,\nvp.ModalSedimentSize_ID,\nvp.PctModalSedimentSize,\nvp.PctFines,\nvp.PctWater,\nvp.PctLitter,\nvp.PctWoodyDebris,\nvp.PctStandingDead,\nvp.PctFilamentousAlgae,\nvp.WoodyCanopyPctCover,\nvp.UnderstoryRootedPctCover,\nvp.AllRootedPctCover,\nvp.PlotDensity,\nvp.BeaverBrowse,\nvp.NoCanopyVeg,\nvp.NoRootedVeg,\nvp.PctSocialTrails,\nvp.NoIndicatorSpecies,\nvp.CalibrationPlot,\nvp.ReplicatePlot,\ne.StartDate,\ns.SiteCode,\np.ParkCode,\nvt.TransectNumber,\nvt.SampleDate\nFROM ((((VegPlot vp\nINNER JOIN VegTransect vt ON vt.ID = vp.VegTransect_ID)\nINNER JOIN Event e ON e.ID = vp.Event_ID)\nINNER JOIN Site s ON s.ID = vp.Site_ID)\nINNER JOIN Park p ON p.ID = s.Park_ID)\nWHERE\np.ParkCode = [pkcode]\nAND\n\ns.SiteCode = [scode]; VegPlot listing by site (CANY/DINO) 9/13/2016 9/13/2016 12/5/2017 +154 1 1 0 s_vegplot_by_feature SQL s_vegplot_by_feature PARAMETERS pkcode TEXT(4), scode TEXT(2), feat TEXT(2);\nSELECT DISTINCT\nvp.PlotNumber,\nvp.PlotDistance_m,\nvp.ModalSedimentSize_ID,\nvp.PctModalSedimentSize,\nvp.PercentFines,\nvp.PercentWater,\nvp.PercentLitter,\nvp.PercentWoodyDebris,\nv.PctStandingDead,\nvp.PctFilamentousAlgae,\nvp.WoodyCanopyPctCover,\nvp.UnderstoryRootedPctCover,\nvp.AllRootedPctCover,\nvp.PlotDensity,\nvp.BeaverBrowse,\nvp.NoCanopyVeg,\nvp.NoRootedVeg,\nvp.PctSocialTrails,\nvp.NoIndicatorSpecies,\nvp.CalibrationPlot,\nvp.ReplicatePlot,\ne.StartDate,\nf.Feature,\ns.SiteCode,\np.ParkCode,\nvt.TransectNumber,\nvt.SampleDate\nFROM ((((((VegPlot vp\nINNER JOIN VegTransect vt ON vt.ID = vp.VegTransect_ID)\nINNER JOIN Event e ON e.ID = vp.Event_ID)\nINNER JOIN Site s ON s.ID = vp.Site_ID)\nINNER JOIN Site_Feature sf ON sf.Site_ID = s.ID)\nINNER JOIN Feature f ON f.ID = sf.Feature_ID)\nINNER JOIN Park p ON p.ID = s.Park_ID)\nWHERE\np.ParkCode = [pkcode]\nAND\ns.SiteCode = [scode]\nAND\n\nf.Feature = [feat]; VegPlot listing by feature (BLCA) 9/13/2016 9/13/2016 12/5/2017 +155 1 1 0 s_flags SQL s_flags SELECT ID, FlagGroup, FlagType, FlagName, \nCode,NumericCode,Label \nFROM Flags\nORDER BY\nFlagGroup, FlagType, Code ASC; Used for flag list 9/22/2016 +156 1 1 0 s_site_by_park_river_segment SQL s_site_by_park_river_segment pkcode:string|seg:string PARAMETERS pkcode TEXT(4), seg TEXT(10);\nSELECT s.ID, s.SiteCode, s.SiteName, s.SiteDescription, s.SiteDirections, s.IsActiveForProtocol, s.SiteName + ' (' + s.SiteCode + ')' AS Site\nFROM ((Site s\nINNER JOIN Park p ON p.ID = s.Park_ID)\nINNER JOIN River r ON r.ID = s.River_ID)\nWHERE\np.ParkCode = [pkcode]\nAND r.Segment = [seg]\nORDER BY\nSiteName, SiteCode ASC; Used for site breadcrumb 9/22/2016 +157 1 1 0 s_location_by_park_river_segment SQL s_location_by_park_river_segment PARAMETERS pkcode TEXT(4), seg TEXT(25);\nSELECT DISTINCT l.ID, l.LocationName, l.CollectionSourceName, l.LocationType\nFROM (((Location l\nINNER JOIN Site s ON s.ID = l.Site_ID)\nINNER JOIN Park p ON s.Park_ID = p.ID)\nINNER JOIN River r ON r.ID = s.River_ID)\nWHERE p.ParkCode = [pkcode]\nAND r.Segment = [seg]\n; Used to populate location dropdown for Event form 9/26/2016 10/2/2017 47 +158 1 1 0 s_mod_wentworth_scale SQL s_mod_wentworth_scale SELECT w.ID, w.Code, w.Label, w.ActiveYear, w.RetireYear, w.DiameterRange_mm, w.Label + '('+ w.Code +')' AS category\nFROM ModWentworthScale AS w\nORDER BY w.RetireYear, w.CategoryOrder; Lists all sediment class size categories 10/4/2016 10/4/2016 10/4/2016 +159 1 1 0 s_mod_wentworth_scale_by_year SQL s_mod_wentworth_scale_by_year PARAMETERS yractive INT;\nSELECT w.ID, w.Code, w.Label, w.ActiveYear, w.RetireYear, w.DiameterRange_mm, w.Label + '('+ w.Code +')' AS category\nFROM ModWentworthScale AS w\nWHERE\nw.ActiveYear < [yractive] + 1\nAND w.RetireYear IS NULL\nORDER BY w.RetireYear, w.CategoryOrder; List active sediment class size categories 10/4/2016 10/4/2016 11/3/2017 +166 1 1 0 s_app_version SQL s_app_version SELECT VersionNumber\nFROM tsys_App_Releases\nWHERE \nIsSupported > 0\nORDER BY IsSupported; Used to retrieve database app version via GetAppVersion() mod_Initialize_App 10/5/2016 10/5/2016 10/5/2016 +167 1 1 0 s_app_enum_list SQL s_app_enum_list PARAMETERS etype TEXT(25);\nSELECT ID, Label, Summary\nFROM AppEnum\nWHERE EnumType = [etype]\nORDER BY Sequence ASC; Used to retrieve enum values 10/17/2016 10/17/2016 10/17/2016 +169 1 1 0 u_mod_wentworth_retireyear SQL u_mod_wentworth_retireyear PARAMETERS yr INT, mwsid LONG;\nUPDATE ModWentworthScale\nSET\nRetireYear = yr\nWHERE\nID = mwsid; Updates retirement year via Mod Wentworth Scale form 10/24/2016 10/24/2016 10/24/2016 +170 1 1 0 s_task_list SQL s_task_list SELECT t.ID, t.TaskType, t.Task, t.Status_ID, t.Priority_ID, t.RequestedBy_ID, t.RequestDate, t.CompletedBy_ID, t.CompleteDate, p.Priority, p.Icon, s.Status, s.Icon,\nc1.FirstName + ' ' + c1.LastName AS Requestor, c1.ID, c2.FirstName + ' ' + c2.LastName AS Completor, c2.ID \nFROM ((((Task t\nLEFT JOIN Priority p ON p.ID = t.Priority_ID)\nLEFT JOIN Status s ON s.ID = t.Status_ID)\nLEFT JOIN Contact c1 ON c1.ID = t.RequestedBy_ID)\nLEFT JOIN Contact c2 ON c2.ID = t.CompletedBy_ID); Used to present task list on task form 10/28/2016 10/28/2016 2/16/2017 1 +171 1 1 0 i_imported_data SQL i_imported_data PARAMETERS idate DATETIME, sfile TEXT(50), dtbl TEXT(25), numrecs INT, srec LONG, erec LONG;\nINSERT INTO ImportedData\n(ImportDate, SourceFile, DestinationTable, NumberOfRecordsImported, StartRecord_ID, EndRecord_ID)\nVALUES\n([idate], [sfile], [dtbl], [numrecs], [srec], [erec]); Adds import documentation 12/1/2016 +172 1 1 0 s_mod_wentworth_for_year SQL s_mod_wentworth_for_year PARAMETERS yr Long;\nSELECT Label AS ClassSize, Code, DiameterRange_mm, ActiveYear, RetireYear\nFROM ModWentworthScale\nWHERE \n([yr] Between ([ActiveYear]) And ([RetireYear])) \nOR\n(([yr]>[ActiveYear] OR [yr] = [ActiveYear]) \nAND [RetireYear] IS NULL)\n\nORDER BY CategoryOrder; Returns mod wentworth scale in use for given year 12/14/2016 12/14/2016 11/3/2017 +173 1 1 0 s_mod_wentworth_for_eventyr SQL s_mod_wentworth_for_eventyr PARAMETERS eventyr INT;\nSELECT w.ID, w.Label as SubstrateClass, w.Code, w.DiameterRange_mm as Size, w.ActiveYear, w.RetireYear, w.Label + ' ('+ w.Code +')' AS category\nFROM ModWentworthScale AS w\nWHERE\n(\n(w.ActiveYear = [eventyr]) \nOR\n(w.RetireYear = [eventyr])\nOR\n(w.ActiveYear <[eventyr]) \nAND \n((w.RetireYear IS NULL) OR ([eventyr] < w.RetireYear))\n)\nORDER BY w.CategoryOrder; Used to display modified wentworth scale classes for substrate cover % form 1/9/2017 1/9/2017 1 1/9/2017 1 +174 1 1 0 u_contact_isnps_flag SQL u_contact_isnps_flag PARAMETERS flag BYTE, cid LONG;\nUPDATE Contact\nSET IsNPS = [flag]\nWHERE ID = [cid]; Used to update contact is NPS flag. 1/24/2017 +179 1 1 0 i_template SQL i_template PARAMETERS vers FLOAT, sflag INTEGER, contxt TEXT(255), syntx TEXT(10),\ntname TEXT(255), prms TEXT(255), tmpl TEXT(1500), rmks TEXT(255), effdate DATE, CID LONG, LMID LONG;\nINSERT INTO tsys_Db_templates (Version, IsSupported, Context, Syntax, TemplateName, Params, Template, Remarks, EffectiveDate, RetireDate, CreateDate, CreatedBy_ID, LastModified, LastModifiedBy_ID)\nVALUES\n([vers],[sflag],[contxt],[syntx],[tname],[prms],[tmpl],[rmks],[effdate],\nNULL, NOW, [CID],NOW, [LMID]); Used by TemplateAdd form to insert new templates. Note template MEMO field parameter uses TEXT(1500) to avoid error 3139 Syntax error in parameter clause for qdf.sql 1/31/2017 2/2/2017 +204 1 1 0 s_vegplot_number_by_site SQL s_vegplot_number_by_site pkcode:STRING|scode:STRING PARAMETERS pkcode TEXT(4), scode TEXT(2); \nSELECT DISTINCT vp.PlotNumber, s.SiteCode, p.ParkCode, vt.TransectNumber \nFROM (((VegPlot vp \nINNER JOIN VegTransect vt ON vt.ID = vp.VegTransect_ID) \nINNER JOIN Site s ON s.ID = vp.Site_ID) \nINNER JOIN Park p ON p.ID = s.Park_ID) \nWHERE p.ParkCode = [pkcode] AND s.SiteCode = [scode]; Used on locations form to provide a list of veg plot #s for plot location types for cbxLocationID.Recordset 2/1/2017 2/1/2017 11:22:05 AM 22 2/1/2017 11:22:05 AM 22 +232 1 1 0 s_vegtransect_number_by_site SQL s_vegtransect_number_by_site pkcode:STRING|scode:STRING PARAMETERS pkcode TEXT(4), scode TEXT(2); \nSELECT DISTINCT vt.TransectNumber, s.SiteCode, p.ParkCode \nFROM (((VegTransect vt \nINNER JOIN Site_VegTransect sv ON sv.VegTransect_ID = vt.ID)\nINNER JOIN Site s ON s.ID = sv.Site_ID) \nINNER JOIN Park p ON p.ID = s.Park_ID) \nWHERE p.ParkCode = [pkcode] AND s.SiteCode = [scode]; Used for location form dropdown to identify the transects existing at a site. 2/2/2017 2/2/2017 2:02:45 PM 22 2/2/2017 2:02:45 PM 22 +233 1 1 0 s_feature_by_site SQL s_feature_by_site pkcode:STRING|scode:STRING PARAMETERS pkcode TEXT(4), scode TEXT(2); \nSELECT f.ID, f.Feature\nFROM (((Feature f \nLEFT JOIN Site_Feature sf ON sf.Feature_ID = f.ID ) \nLEFT JOIN Site s ON s.ID = sf.Site_ID ) \nLEFT JOIN Park p ON p.ID = s.Park_ID ) \nWHERE p.ParkCode = [pkcode] \nAND s.SiteCode = [scode] \nAND s.IsActiveForProtocol = 1 \nORDER BY f.Feature ASC; Used for location form dropdown to identify the features existing at a site. 2/2/2017 2/2/2017 3:24:15 PM 22 2/2/2017 3:24:15 PM 22 +234 1 1 0 i_location SQL i_location csn:STRING|ltype:STRING|lname:STRING|\ndist:INTEGER|brg:INTEGER|lnotes:STRING|CID:LONG|LMID:LONG PARAMETERS csn TEXT(25), ltype TEXT(1), lname TEXT(100), \ndist INTEGER, brg INTEGER, lnotes TEXT(1500), sid LONG, CID LONG, LMID LONG;\nINSERT INTO Location\n(CollectionSourceName, LocationType, LocationName, HeadtoOrientDistance_m,\nHeadtoOrientBearing, LocationNotes, Site_ID, CreateDate, CreatedBy_ID,\nLastModified, LastModifiedBy_ID)\nVALUES\n([csn], [ltype], [lname], [dist], [brg], [lnotes], [sid], Now, [CID], Now, [LMID]); Used by location form to insert locations into the database. 2/2/2017 2/2/2017 4:23:10 PM 22 2/7/2017 1:39:10 PM 22 +235 1 1 0 i_sensitive_locations SQL i_sensitive_locations pkid:LONG|lid:LONG|CID:LONG|LMID:LONG PARAMETERS pkid LONG, lid LONG, CID LONG, LMID LONG;\nINSERT INTO SensitiveLocations(Park_ID, Location_ID, CreateDate,\nCreatedBy_ID, LastModified, LastModifiedBy_ID)\nVALUES([pkid],[lid],Now,[CID],Now,[LMID]); Used by location form (list) to add sensitive locations. 2/3/2017 2/3/2017 10:48:53 AM 22 2/3/2017 10:48:53 AM 22 +236 1 1 0 d_sensitive_locations SQL d_sensitive_locations pkid:LONG|lid:LONG PARAMETERS pkid LONG, lid LONG;\nDELETE * FROM SensitiveLocations\nWHERE\nPark_ID = [pkid]\nAND Location_ID = [lid]; Used by location form (list) to remove sensitive locations. 2/3/2017 2/3/2017 11:00:39 AM 22 2/3/2017 11:00:39 AM 22 +237 1 1 0 i_sensitive_species SQL i_sensitive_species pkid:LONG|sp:STRING|CID:LONG|LMID:LONG PARAMETERS pkid LONG, sp TEXT(20), CID LONG, LMID LONG;\nINSERT INTO SensitiveSpecies(Park_ID, Master_PLANT_Code, CreateDate,\nCreatedBy_ID, LastModified, LastModifiedBy_ID)\nVALUES([pkid],[sp],Now,[CID],Now,[LMID]); Used to add to park sensitive species list 2/3/2017 2/3/2017 11:01:58 AM 22 2/3/2017 11:01:58 AM 22 +238 1 1 0 d_sensitive_species SQL d_sensitive_species pkid:LONG|sp:STRING PARAMETERS pkid LONG, sp TEXT(20);\nDELETE * FROM SensitiveSpecies\nWHERE \nPark_ID = [pkid]\nAND Master_PLANT_Code = [sp]; Used to remove species from park sensitive species list 2/3/2017 2/3/2017 11:02:54 AM 22 2/3/2017 11:02:54 AM 22 +239 1 1 0 s_location_with_loctypeID_sensitivity SQL s_location_with_loctypeID_sensitivity pkcode:STRING|scode:STRING PARAMETERS pkcode TEXT(4), scode TEXT(2);\nSELECT l.ID, CollectionSourceName, LocationType, LocationName, HeadToOrientDistance_m, HeadToOrientBearing, LocationNotes, s.SiteCode, p.ParkCode, p.ID AS ParkID, Site_ID, \nSWITCH (\nLocationType ='P', \n(\nCollectionSourceName\n),\nLocationType ='T', \n(\nCollectionSourceName\n),\nLocationType ='F', \n(\nSELECT DISTINCT f.ID \nFROM (((Feature f\nINNER JOIN Site_Feature sf ON sf.Feature_ID = f.ID)\nINNER JOIN Site s ON s.ID = sf.Site_ID)\nINNER JOIN Park p ON p.ID = s.Park_ID)\nWHERE \nCStr(Feature) = CStr(CollectionSourceName)\nAND p.ParkCode = [pkcode]\nAND s.SiteCode = [scode];\n)\n) AS LocTypeID,\n(SELECT COUNT(sl.Location_ID) FROM SensitiveLocations sl WHERE sl.Location_ID = l.ID) AS IsSensitive\nFROM ((Location l\nINNER JOIN Site s ON s.ID = l.Site_ID)\nINNER JOIN Park p ON p.ID = s.Park_ID)\nWHERE\np.ParkCode = [pkcode]\nAND\ns.SiteCode = [scode]; Used for location form list. Identifies ID associated w/ feature, vegtransect or vegplot and whether location is sensitive (joined to SensitiveLocations). 2/7/2017 2/7/2017 10:29:36 AM 22 11/3/2017 6:53:36 AM 22 +240 1 1 0 u_site SQL u_site PARAMETERS sname TEXT(50), scode TEXT(2), sdesc TEXT(255), sdir TEXT(255),flag BYTE, sid LONG;\nUPDATE Site\nSET SiteCode = [scode],\nSiteName = [sname],\nSiteDirections = [sdir],\nSiteDescription = [sdesc],\nIsActiveForProtocol = [flag]\nWHERE ID = [sid]; Updates site via Site form 10/17/2017 +241 1 1 0 s_plot_numbers SQL s_plot_numbers PARAMETERS maxnum INT;\nSELECT DISTINCT PlotNum FROM AppPlot \nWHERE PlotNum = INT(PlotNum)\nAND PlotNum < [maxnum]+1; Populates available plot #s for location form when location type = 'P' (plot) 11/2/2017 11/2/2017 22 11/8/2017 22 +242 1 1 0 s_transect_numbers SQL s_transect_numbers PARAMETERS maxnum INT;\nSELECT Replace(Label, 'T',''), Label\nFROM AppEnum\nWHERE EnumType = 'TransectNumber'\nAND Replace(Label,'T','') < [maxnum] + 1; Populates available transect #s for location form when location type = 'T' (transect) 11/2/2017 11/2/2017 22 11/2/2017 22 +243 1 1 0 i_site_vegtransect SQL i_site_vegtransect PARAMETERS sid LONG, tid LONG;\nINSERT INTO Site_VegTransect (Site_ID, VegTransect_ID)\nVALUES ([sid],[tid]); Adds the linking record between site & vegtransect when new vegtransects are added 11/6/2017 11/6/2017 11/6/2017 +244 1 1 0 s_plot_locations SQL s_plot_locations PARAMETERS maxnum INT;\nSELECT DISTINCT PlotNum FROM AppPlot\nWHERE PlotNum < [maxnum]+1; Populates available plot locations for location form when location type = 'P' (plot) 11/8/2017 11/8/2017 11/8/2017 +245 1 1 0 s_location_by_site SQL s_location_by_site PARAMETERS pkcode TEXT(4), scode TEXT(2);\nSELECT DISTINCT\nl.ID,\nl.Site_ID,\nl.LocationType,\nl.CollectionSourceName,\nl.LocationName,\ns.SiteCode,\np.ParkCode\nFROM ((Location l\nINNER JOIN Site s ON s.ID = l.Site_ID)\nINNER JOIN Park p ON p.ID = s.Park_ID)\nWHERE \np.ParkCode = [pkcode]\nAND\ns.SiteCode = [scode]; Lists locations for VegTransect form when site is highest hierarchy level 11/9/2017 11/9/2017 11/9/2017 +246 1 1 0 s_location_by_feature SQL s_location_by_feature PARAMETERS pkcode TEXT(4), scode TEXT(2), feat TEXT(2);\nSELECT DISTINCT\nl.ID,\nl.Site_ID,\nl.LocationType,\nl.CollectionSourceName,\nl.LocationName,\nf.Feature,\ns.SiteCode,\np.ParkCode\nFROM (((Location l\nINNER JOIN Feature f ON f.Feature = l.LocationName\nINNER JOIN Site s ON s.ID = l.Site_ID)\nINNER JOIN Park p ON p.ID = s.Park_ID)\nWHERE \np.ParkCode = [pkcode]\nAND\ns.SiteCode = [scode]\nAND\nf.Feature = [feat]\nAND\nl.LocationType = 'F'; Lists locations for VegTransect form when feature is the highest hierarchy level 11/9/2017 11/9/2017 11/9/2017 +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 diff --git a/source/tbldef/Access.LNKD b/source/tbldef/Access.LNKD index ad899fc..2837ae7 100644 --- a/source/tbldef/Access.LNKD +++ b/source/tbldef/Access.LNKD @@ -1,4 +1,4 @@ Access -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Access ID diff --git a/source/tbldef/AppComment.LNKD b/source/tbldef/AppComment.LNKD index 633b44d..3845472 100644 --- a/source/tbldef/AppComment.LNKD +++ b/source/tbldef/AppComment.LNKD @@ -1,4 +1,4 @@ AppComment -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb AppComment ID diff --git a/source/tbldef/Contact.LNKD b/source/tbldef/Contact.LNKD index 3caf9d5..9f84701 100644 --- a/source/tbldef/Contact.LNKD +++ b/source/tbldef/Contact.LNKD @@ -1,4 +1,4 @@ Contact -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Contact ID diff --git a/source/tbldef/Contact_Access.LNKD b/source/tbldef/Contact_Access.LNKD index 94689b2..fc796ce 100644 --- a/source/tbldef/Contact_Access.LNKD +++ b/source/tbldef/Contact_Access.LNKD @@ -1,4 +1,4 @@ Contact_Access -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Contact_Access Contact_ID;+Access_ID diff --git a/source/tbldef/Event.LNKD b/source/tbldef/Event.LNKD index d21fefe..4b0d2a7 100644 --- a/source/tbldef/Event.LNKD +++ b/source/tbldef/Event.LNKD @@ -1,4 +1,4 @@ Event -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Event ID diff --git a/source/tbldef/Event_Photo.LNKD b/source/tbldef/Event_Photo.LNKD index 67ffd88..2c29eac 100644 --- a/source/tbldef/Event_Photo.LNKD +++ b/source/tbldef/Event_Photo.LNKD @@ -1,4 +1,4 @@ Event_Photo -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Event_Photo Event_ID;+Photo_ID diff --git a/source/tbldef/Feature.LNKD b/source/tbldef/Feature.LNKD index 41ad81b..870fecc 100644 --- a/source/tbldef/Feature.LNKD +++ b/source/tbldef/Feature.LNKD @@ -1,4 +1,4 @@ Feature -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Feature ID diff --git a/source/tbldef/Feature_VegTransect.LNKD b/source/tbldef/Feature_VegTransect.LNKD index 39eb1cc..85a28b3 100644 --- a/source/tbldef/Feature_VegTransect.LNKD +++ b/source/tbldef/Feature_VegTransect.LNKD @@ -1,4 +1,4 @@ Feature_VegTransect -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Feature_VegTransect Feature_ID;+VegTransect_ID diff --git a/source/tbldef/Flags.LNKD b/source/tbldef/Flags.LNKD index 1243e46..6a4f228 100644 --- a/source/tbldef/Flags.LNKD +++ b/source/tbldef/Flags.LNKD @@ -1,4 +1,4 @@ Flags -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Flags ID diff --git a/source/tbldef/ImportedData.LNKD b/source/tbldef/ImportedData.LNKD index 4b3154f..d0f890e 100644 --- a/source/tbldef/ImportedData.LNKD +++ b/source/tbldef/ImportedData.LNKD @@ -1,4 +1,4 @@ ImportedData -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb ImportedData ID diff --git a/source/tbldef/IsDeadSpecies.LNKD b/source/tbldef/IsDeadSpecies.LNKD index 813fb5d..24990cb 100644 --- a/source/tbldef/IsDeadSpecies.LNKD +++ b/source/tbldef/IsDeadSpecies.LNKD @@ -1,4 +1,4 @@ IsDeadSpecies -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb IsDeadSpecies Master_PLANT_Code diff --git a/source/tbldef/IsSeedlingSpecies.LNKD b/source/tbldef/IsSeedlingSpecies.LNKD index 0fe9d06..f97cf81 100644 --- a/source/tbldef/IsSeedlingSpecies.LNKD +++ b/source/tbldef/IsSeedlingSpecies.LNKD @@ -1,4 +1,4 @@ IsSeedlingSpecies -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb IsSeedlingSpecies Master_PLANT_Code diff --git a/source/tbldef/ListedSpecies.LNKD b/source/tbldef/ListedSpecies.LNKD index bf76c62..c23b85c 100644 --- a/source/tbldef/ListedSpecies.LNKD +++ b/source/tbldef/ListedSpecies.LNKD @@ -1,4 +1,4 @@ ListedSpecies -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb ListedSpecies ID diff --git a/source/tbldef/Location.LNKD b/source/tbldef/Location.LNKD index 118634b..6318c0a 100644 --- a/source/tbldef/Location.LNKD +++ b/source/tbldef/Location.LNKD @@ -1,4 +1,4 @@ Location -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Location ID diff --git a/source/tbldef/Location_SurveyPoint.LNKD b/source/tbldef/Location_SurveyPoint.LNKD index 04d0293..344080c 100644 --- a/source/tbldef/Location_SurveyPoint.LNKD +++ b/source/tbldef/Location_SurveyPoint.LNKD @@ -1,4 +1,4 @@ Location_SurveyPoint -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Location_SurveyPoint Location_ID;+SurveyPoint_ID diff --git a/source/tbldef/Logger.LNKD b/source/tbldef/Logger.LNKD index 2f82873..cfe91b5 100644 --- a/source/tbldef/Logger.LNKD +++ b/source/tbldef/Logger.LNKD @@ -1,4 +1,4 @@ Logger -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Logger ID diff --git a/source/tbldef/Measurement_Flags.LNKD b/source/tbldef/Measurement_Flags.LNKD index 8b3e5a1..60d1b1e 100644 --- a/source/tbldef/Measurement_Flags.LNKD +++ b/source/tbldef/Measurement_Flags.LNKD @@ -1,4 +1,4 @@ Measurement_Flags -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Measurement_Flags RecordTable;+Record_ID;+RecordField;+Flag_ID diff --git a/source/tbldef/ModWentworthCategory_Year.LNKD b/source/tbldef/ModWentworthCategory_Year.LNKD index 0ff1e89..9ff1d9c 100644 --- a/source/tbldef/ModWentworthCategory_Year.LNKD +++ b/source/tbldef/ModWentworthCategory_Year.LNKD @@ -1,4 +1,4 @@ ModWentworthCategory_Year -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb ModWentworthCategory_Year ID;+VisitYear diff --git a/source/tbldef/ModWentworthScale.LNKD b/source/tbldef/ModWentworthScale.LNKD index fc63c0d..d12369d 100644 --- a/source/tbldef/ModWentworthScale.LNKD +++ b/source/tbldef/ModWentworthScale.LNKD @@ -1,4 +1,4 @@ ModWentworthScale -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb ModWentworthScale ID diff --git a/source/tbldef/Park.LNKD b/source/tbldef/Park.LNKD index 6ff4a10..5824fe4 100644 --- a/source/tbldef/Park.LNKD +++ b/source/tbldef/Park.LNKD @@ -1,4 +1,4 @@ Park -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Park ID diff --git a/source/tbldef/Photo.LNKD b/source/tbldef/Photo.LNKD index 1779d05..81b6ce7 100644 --- a/source/tbldef/Photo.LNKD +++ b/source/tbldef/Photo.LNKD @@ -1,4 +1,4 @@ Photo -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Photo ID diff --git a/source/tbldef/Priority.LNKD b/source/tbldef/Priority.LNKD index 3a8b7cc..3ebce53 100644 --- a/source/tbldef/Priority.LNKD +++ b/source/tbldef/Priority.LNKD @@ -1,4 +1,4 @@ Priority -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Priority ID diff --git a/source/tbldef/Protocol.LNKD b/source/tbldef/Protocol.LNKD index f24293e..4984e4d 100644 --- a/source/tbldef/Protocol.LNKD +++ b/source/tbldef/Protocol.LNKD @@ -1,4 +1,4 @@ Protocol -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Protocol ID diff --git a/source/tbldef/RecordAction.LNKD b/source/tbldef/RecordAction.LNKD index 61af176..69432bd 100644 --- a/source/tbldef/RecordAction.LNKD +++ b/source/tbldef/RecordAction.LNKD @@ -1,4 +1,4 @@ RecordAction -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb RecordAction ID diff --git a/source/tbldef/River.LNKD b/source/tbldef/River.LNKD index f45ffeb..91d0c69 100644 --- a/source/tbldef/River.LNKD +++ b/source/tbldef/River.LNKD @@ -1,4 +1,4 @@ River -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb River ID diff --git a/source/tbldef/RootedSpecies.LNKD b/source/tbldef/RootedSpecies.LNKD index 8e64666..a6a7c39 100644 --- a/source/tbldef/RootedSpecies.LNKD +++ b/source/tbldef/RootedSpecies.LNKD @@ -1,4 +1,4 @@ RootedSpecies -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb RootedSpecies ID diff --git a/source/tbldef/SOP.LNKD b/source/tbldef/SOP.LNKD index 68ea221..c26f545 100644 --- a/source/tbldef/SOP.LNKD +++ b/source/tbldef/SOP.LNKD @@ -1,4 +1,4 @@ SOP -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb SOP ID diff --git a/source/tbldef/SensitiveLocations.LNKD b/source/tbldef/SensitiveLocations.LNKD index fdd9c58..f04744e 100644 --- a/source/tbldef/SensitiveLocations.LNKD +++ b/source/tbldef/SensitiveLocations.LNKD @@ -1,4 +1,4 @@ SensitiveLocations -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb SensitiveLocations ID diff --git a/source/tbldef/SensitiveSpecies.LNKD b/source/tbldef/SensitiveSpecies.LNKD index 37dbe21..289a947 100644 --- a/source/tbldef/SensitiveSpecies.LNKD +++ b/source/tbldef/SensitiveSpecies.LNKD @@ -1,4 +1,4 @@ SensitiveSpecies -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb SensitiveSpecies ID diff --git a/source/tbldef/Site.LNKD b/source/tbldef/Site.LNKD index 8093abb..896b181 100644 --- a/source/tbldef/Site.LNKD +++ b/source/tbldef/Site.LNKD @@ -1,4 +1,4 @@ Site -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Site ID diff --git a/source/tbldef/Site_Feature.LNKD b/source/tbldef/Site_Feature.LNKD index a7b1253..be5eef0 100644 --- a/source/tbldef/Site_Feature.LNKD +++ b/source/tbldef/Site_Feature.LNKD @@ -1,4 +1,4 @@ Site_Feature -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Site_Feature Site_ID;+Feature_ID diff --git a/source/tbldef/Site_VegTransect.LNKD b/source/tbldef/Site_VegTransect.LNKD index 5fa8f93..a74f30c 100644 --- a/source/tbldef/Site_VegTransect.LNKD +++ b/source/tbldef/Site_VegTransect.LNKD @@ -1,4 +1,4 @@ Site_VegTransect -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Site_VegTransect Site_ID;+VegTransect_ID diff --git a/source/tbldef/Status.LNKD b/source/tbldef/Status.LNKD index 022da98..d681cd4 100644 --- a/source/tbldef/Status.LNKD +++ b/source/tbldef/Status.LNKD @@ -1,4 +1,4 @@ Status -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Status ID diff --git a/source/tbldef/SubstrateCover.LNKD b/source/tbldef/SubstrateCover.LNKD index a3db03f..76111b5 100644 --- a/source/tbldef/SubstrateCover.LNKD +++ b/source/tbldef/SubstrateCover.LNKD @@ -1,4 +1,4 @@ SubstrateCover -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb SubstrateCover ID diff --git a/source/tbldef/SurveyDataSourceFile.LNKD b/source/tbldef/SurveyDataSourceFile.LNKD index 99581b2..7837811 100644 --- a/source/tbldef/SurveyDataSourceFile.LNKD +++ b/source/tbldef/SurveyDataSourceFile.LNKD @@ -1,4 +1,4 @@ SurveyDataSourceFile -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb SurveyDataSourceFile ID diff --git a/source/tbldef/SurveyDataSourceFile_SurveyPoint.LNKD b/source/tbldef/SurveyDataSourceFile_SurveyPoint.LNKD index bfa2d1c..aef3435 100644 --- a/source/tbldef/SurveyDataSourceFile_SurveyPoint.LNKD +++ b/source/tbldef/SurveyDataSourceFile_SurveyPoint.LNKD @@ -1,4 +1,4 @@ SurveyDataSourceFile_SurveyPoint -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb SurveyDataSourceFile_SurveyPoint SurveyDataSourceFile_ID;+SurveyPoint_ID diff --git a/source/tbldef/SurveyPoint.LNKD b/source/tbldef/SurveyPoint.LNKD index e975a4c..9d08101 100644 --- a/source/tbldef/SurveyPoint.LNKD +++ b/source/tbldef/SurveyPoint.LNKD @@ -1,4 +1,4 @@ SurveyPoint -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb SurveyPoint ID diff --git a/source/tbldef/SurveyPointError.LNKD b/source/tbldef/SurveyPointError.LNKD index f5b8cb6..c574cce 100644 --- a/source/tbldef/SurveyPointError.LNKD +++ b/source/tbldef/SurveyPointError.LNKD @@ -1,4 +1,4 @@ SurveyPointError -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb SurveyPointError ID diff --git a/source/tbldef/Tagline.LNKD b/source/tbldef/Tagline.LNKD index 8dd0e87..4085b59 100644 --- a/source/tbldef/Tagline.LNKD +++ b/source/tbldef/Tagline.LNKD @@ -1,4 +1,4 @@ Tagline -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Tagline ID diff --git a/source/tbldef/Task.LNKD b/source/tbldef/Task.LNKD index 6e3c9e7..b71b01a 100644 --- a/source/tbldef/Task.LNKD +++ b/source/tbldef/Task.LNKD @@ -1,4 +1,4 @@ Task -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Task ID diff --git a/source/tbldef/Transducer.LNKD b/source/tbldef/Transducer.LNKD index a73a39e..13535d1 100644 --- a/source/tbldef/Transducer.LNKD +++ b/source/tbldef/Transducer.LNKD @@ -1,4 +1,4 @@ Transducer -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb Transducer ID diff --git a/source/tbldef/TransducerDistance.LNKD b/source/tbldef/TransducerDistance.LNKD index 560fee7..3d4bd72 100644 --- a/source/tbldef/TransducerDistance.LNKD +++ b/source/tbldef/TransducerDistance.LNKD @@ -1,4 +1,4 @@ TransducerDistance -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb TransducerDistance ID diff --git a/source/tbldef/UnderstorySpecies.LNKD b/source/tbldef/UnderstorySpecies.LNKD index 2d828fc..416c0e8 100644 --- a/source/tbldef/UnderstorySpecies.LNKD +++ b/source/tbldef/UnderstorySpecies.LNKD @@ -1,4 +1,4 @@ UnderstorySpecies -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb UnderstorySpecies ID diff --git a/source/tbldef/UnknownSpecies.LNKD b/source/tbldef/UnknownSpecies.LNKD index 35fece1..13bb83d 100644 --- a/source/tbldef/UnknownSpecies.LNKD +++ b/source/tbldef/UnknownSpecies.LNKD @@ -1,4 +1,4 @@ UnknownSpecies -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb UnknownSpecies ID diff --git a/source/tbldef/VegPlot.LNKD b/source/tbldef/VegPlot.LNKD index 1f286f9..aa85a6a 100644 --- a/source/tbldef/VegPlot.LNKD +++ b/source/tbldef/VegPlot.LNKD @@ -1,4 +1,4 @@ VegPlot -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb VegPlot ID diff --git a/source/tbldef/VegTransect.LNKD b/source/tbldef/VegTransect.LNKD index 67561c3..bf4e172 100644 --- a/source/tbldef/VegTransect.LNKD +++ b/source/tbldef/VegTransect.LNKD @@ -1,4 +1,4 @@ VegTransect -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb VegTransect ID diff --git a/source/tbldef/VegWalk.LNKD b/source/tbldef/VegWalk.LNKD index 7563cc2..59a01ff 100644 --- a/source/tbldef/VegWalk.LNKD +++ b/source/tbldef/VegWalk.LNKD @@ -1,4 +1,4 @@ VegWalk -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb VegWalk ID diff --git a/source/tbldef/VegWalkSpecies.LNKD b/source/tbldef/VegWalkSpecies.LNKD index 85cbece..71a5dd7 100644 --- a/source/tbldef/VegWalkSpecies.LNKD +++ b/source/tbldef/VegWalkSpecies.LNKD @@ -1,4 +1,4 @@ VegWalkSpecies -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb VegWalkSpecies ID diff --git a/source/tbldef/WoodyCanopySpecies.LNKD b/source/tbldef/WoodyCanopySpecies.LNKD index 05880c0..5a3246e 100644 --- a/source/tbldef/WoodyCanopySpecies.LNKD +++ b/source/tbldef/WoodyCanopySpecies.LNKD @@ -1,4 +1,4 @@ WoodyCanopySpecies -;DATABASE=.\big_rivers_be_raw.accdb +;DATABASE=Z:\_____LIB\dev\git_projects\TEST_DATA\big_rivers_be.accdb WoodyCanopySpecies ID