Public Class FrTissue
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
    Friend WithEvents TxDescription As System.Windows.Forms.TextBox
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents TxColumn As System.Windows.Forms.TextBox
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents TxRow As System.Windows.Forms.TextBox
    Friend WithEvents ckAvailable As System.Windows.Forms.CheckBox
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents TxBoxName As System.Windows.Forms.TextBox
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents TxDatecollected As System.Windows.Forms.TextBox
    Friend WithEvents Type As System.Windows.Forms.Label
    Friend WithEvents cbType As System.Windows.Forms.ComboBox
    Friend WithEvents Label9 As System.Windows.Forms.Label
    Friend WithEvents TxSpeciesCode As System.Windows.Forms.TextBox
    Friend WithEvents Label10 As System.Windows.Forms.Label
    Friend WithEvents TxSpecies As System.Windows.Forms.TextBox
    Friend WithEvents Label11 As System.Windows.Forms.Label
    Friend WithEvents TxGenus As System.Windows.Forms.TextBox
    Friend WithEvents Label12 As System.Windows.Forms.Label
    Friend WithEvents TxVariety As System.Windows.Forms.TextBox
    Friend WithEvents Label13 As System.Windows.Forms.Label
    Friend WithEvents TxAuthority As System.Windows.Forms.TextBox
    Friend WithEvents Label14 As System.Windows.Forms.Label
    Friend WithEvents TxCollectedBy As System.Windows.Forms.TextBox
    Friend WithEvents Label15 As System.Windows.Forms.Label
    Friend WithEvents TxTreatment As System.Windows.Forms.TextBox
    Friend WithEvents Label16 As System.Windows.Forms.Label
    Friend WithEvents TxTissue As System.Windows.Forms.TextBox
    Friend WithEvents Label17 As System.Windows.Forms.Label
    Friend WithEvents TxCultivationMethod As System.Windows.Forms.TextBox
    Friend WithEvents Label18 As System.Windows.Forms.Label
    Friend WithEvents Label19 As System.Windows.Forms.Label
    Friend WithEvents TxComments As System.Windows.Forms.TextBox
    Friend WithEvents ButAdd As System.Windows.Forms.Button
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
    Friend WithEvents ButUpdate As System.Windows.Forms.Button
    Friend WithEvents ButDelete As System.Windows.Forms.Button
    Friend WithEvents ButQuit As System.Windows.Forms.Button
    Friend WithEvents TxEstimatedAmount As System.Windows.Forms.TextBox
    Friend WithEvents Label21 As System.Windows.Forms.Label
    Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
    Friend WithEvents Label22 As System.Windows.Forms.Label
    Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
    Friend WithEvents CheckBox1 As System.Windows.Forms.CheckBox
    Friend WithEvents DataGrid2 As System.Windows.Forms.DataGrid
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents TxX_GPS As System.Windows.Forms.TextBox
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents TxY_GPS As System.Windows.Forms.TextBox
    Friend WithEvents Label20 As System.Windows.Forms.Label
    Friend WithEvents TxZ_GPS As System.Windows.Forms.TextBox
    Friend WithEvents Label23 As System.Windows.Forms.Label
    Friend WithEvents TxDatum As System.Windows.Forms.TextBox
    Friend WithEvents Label24 As System.Windows.Forms.Label
    Friend WithEvents TxAccuracy As System.Windows.Forms.TextBox
    Friend WithEvents TxGPS_Unit As System.Windows.Forms.TextBox
    Friend WithEvents cbLocation As System.Windows.Forms.ComboBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.DataGrid1 = New System.Windows.Forms.DataGrid
        Me.TxDescription = New System.Windows.Forms.TextBox
        Me.Label3 = New System.Windows.Forms.Label
        Me.TxColumn = New System.Windows.Forms.TextBox
        Me.Label4 = New System.Windows.Forms.Label
        Me.TxRow = New System.Windows.Forms.TextBox
        Me.ckAvailable = New System.Windows.Forms.CheckBox
        Me.Label5 = New System.Windows.Forms.Label
        Me.TxBoxName = New System.Windows.Forms.TextBox
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label7 = New System.Windows.Forms.Label
        Me.TxDatecollected = New System.Windows.Forms.TextBox
        Me.Type = New System.Windows.Forms.Label
        Me.cbType = New System.Windows.Forms.ComboBox
        Me.Label9 = New System.Windows.Forms.Label
        Me.TxSpeciesCode = New System.Windows.Forms.TextBox
        Me.Label10 = New System.Windows.Forms.Label
        Me.TxSpecies = New System.Windows.Forms.TextBox
        Me.Label11 = New System.Windows.Forms.Label
        Me.TxGenus = New System.Windows.Forms.TextBox
        Me.Label12 = New System.Windows.Forms.Label
        Me.TxVariety = New System.Windows.Forms.TextBox
        Me.Label13 = New System.Windows.Forms.Label
        Me.TxAuthority = New System.Windows.Forms.TextBox
        Me.Label14 = New System.Windows.Forms.Label
        Me.TxCollectedBy = New System.Windows.Forms.TextBox
        Me.Label15 = New System.Windows.Forms.Label
        Me.TxTreatment = New System.Windows.Forms.TextBox
        Me.Label16 = New System.Windows.Forms.Label
        Me.TxTissue = New System.Windows.Forms.TextBox
        Me.Label17 = New System.Windows.Forms.Label
        Me.TxCultivationMethod = New System.Windows.Forms.TextBox
        Me.Label18 = New System.Windows.Forms.Label
        Me.TxEstimatedAmount = New System.Windows.Forms.TextBox
        Me.Label19 = New System.Windows.Forms.Label
        Me.TxComments = New System.Windows.Forms.TextBox
        Me.ButAdd = New System.Windows.Forms.Button
        Me.PictureBox1 = New System.Windows.Forms.PictureBox
        Me.ButUpdate = New System.Windows.Forms.Button
        Me.ButDelete = New System.Windows.Forms.Button
        Me.ButQuit = New System.Windows.Forms.Button
        Me.Label21 = New System.Windows.Forms.Label
        Me.TextBox2 = New System.Windows.Forms.TextBox
        Me.Label22 = New System.Windows.Forms.Label
        Me.TextBox4 = New System.Windows.Forms.TextBox
        Me.CheckBox1 = New System.Windows.Forms.CheckBox
        Me.DataGrid2 = New System.Windows.Forms.DataGrid
        Me.Label1 = New System.Windows.Forms.Label
        Me.TxGPS_Unit = New System.Windows.Forms.TextBox
        Me.Label2 = New System.Windows.Forms.Label
        Me.TxX_GPS = New System.Windows.Forms.TextBox
        Me.Label8 = New System.Windows.Forms.Label
        Me.TxY_GPS = New System.Windows.Forms.TextBox
        Me.Label20 = New System.Windows.Forms.Label
        Me.TxZ_GPS = New System.Windows.Forms.TextBox
        Me.Label23 = New System.Windows.Forms.Label
        Me.TxDatum = New System.Windows.Forms.TextBox
        Me.Label24 = New System.Windows.Forms.Label
        Me.TxAccuracy = New System.Windows.Forms.TextBox
        Me.cbLocation = New System.Windows.Forms.ComboBox
        CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DataGrid2, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'DataGrid1
        '
        Me.DataGrid1.DataMember = ""
        Me.DataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText
        Me.DataGrid1.Location = New System.Drawing.Point(0, 0)
        Me.DataGrid1.Name = "DataGrid1"
        Me.DataGrid1.Size = New System.Drawing.Size(712, 240)
        Me.DataGrid1.TabIndex = 0
        '
        'TxDescription
        '
        Me.TxDescription.Location = New System.Drawing.Point(78, 248)
        Me.TxDescription.Name = "TxDescription"
        Me.TxDescription.Size = New System.Drawing.Size(178, 20)
        Me.TxDescription.TabIndex = 4
        Me.TxDescription.Text = "TextBox1"
        '
        'Label3
        '
        Me.Label3.Location = New System.Drawing.Point(5, 281)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(64, 16)
        Me.Label3.TabIndex = 5
        Me.Label3.Text = "Column"
        '
        'TxColumn
        '
        Me.TxColumn.Location = New System.Drawing.Point(77, 279)
        Me.TxColumn.Name = "TxColumn"
        Me.TxColumn.Size = New System.Drawing.Size(179, 20)
        Me.TxColumn.TabIndex = 6
        Me.TxColumn.Text = "TextBox1"
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(5, 314)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(72, 24)
        Me.Label4.TabIndex = 7
        Me.Label4.Text = "Row"
        '
        'TxRow
        '
        Me.TxRow.Location = New System.Drawing.Point(77, 312)
        Me.TxRow.Name = "TxRow"
        Me.TxRow.Size = New System.Drawing.Size(178, 20)
        Me.TxRow.TabIndex = 8
        Me.TxRow.Text = "TextBox1"
        '
        'ckAvailable
        '
        Me.ckAvailable.Location = New System.Drawing.Point(76, 338)
        Me.ckAvailable.Name = "ckAvailable"
        Me.ckAvailable.Size = New System.Drawing.Size(184, 24)
        Me.ckAvailable.TabIndex = 9
        Me.ckAvailable.Text = "Available"
        '
        'Label5
        '
        Me.Label5.Location = New System.Drawing.Point(6, 370)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(56, 24)
        Me.Label5.TabIndex = 10
        Me.Label5.Text = "Box name"
        '
        'TxBoxName
        '
        Me.TxBoxName.Location = New System.Drawing.Point(75, 370)
        Me.TxBoxName.Name = "TxBoxName"
        Me.TxBoxName.Size = New System.Drawing.Size(181, 20)
        Me.TxBoxName.TabIndex = 11
        Me.TxBoxName.Text = "TextBox1"
        '
        'Label6
        '
        Me.Label6.Location = New System.Drawing.Point(7, 401)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(56, 24)
        Me.Label6.TabIndex = 12
        Me.Label6.Text = "Location"
        '
        'Label7
        '
        Me.Label7.Location = New System.Drawing.Point(0, 436)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(80, 20)
        Me.Label7.TabIndex = 14
        Me.Label7.Text = "Date collected"
        '
        'TxDatecollected
        '
        Me.TxDatecollected.Location = New System.Drawing.Point(75, 434)
        Me.TxDatecollected.Name = "TxDatecollected"
        Me.TxDatecollected.Size = New System.Drawing.Size(181, 20)
        Me.TxDatecollected.TabIndex = 15
        Me.TxDatecollected.Text = "TextBox2"
        '
        'Type
        '
        Me.Type.Location = New System.Drawing.Point(3, 469)
        Me.Type.Name = "Type"
        Me.Type.Size = New System.Drawing.Size(64, 32)
        Me.Type.TabIndex = 18
        Me.Type.Text = "Type"
        '
        'cbType
        '
        Me.cbType.Location = New System.Drawing.Point(75, 467)
        Me.cbType.Name = "cbType"
        Me.cbType.Size = New System.Drawing.Size(181, 21)
        Me.cbType.TabIndex = 19
        Me.cbType.Text = "ComboBox1"
        '
        'Label9
        '
        Me.Label9.Location = New System.Drawing.Point(-3, 502)
        Me.Label9.Name = "Label9"
        Me.Label9.Size = New System.Drawing.Size(80, 24)
        Me.Label9.TabIndex = 20
        Me.Label9.Text = "Species Code"
        '
        'TxSpeciesCode
        '
        Me.TxSpeciesCode.Location = New System.Drawing.Point(72, 501)
        Me.TxSpeciesCode.Name = "TxSpeciesCode"
        Me.TxSpeciesCode.Size = New System.Drawing.Size(184, 20)
        Me.TxSpeciesCode.TabIndex = 21
        Me.TxSpeciesCode.Text = "TextBox1"
        '
        'Label10
        '
        Me.Label10.Location = New System.Drawing.Point(5, 536)
        Me.Label10.Name = "Label10"
        Me.Label10.Size = New System.Drawing.Size(64, 24)
        Me.Label10.TabIndex = 22
        Me.Label10.Text = "Species"
        '
        'TxSpecies
        '
        Me.TxSpecies.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxSpecies.Location = New System.Drawing.Point(70, 536)
        Me.TxSpecies.Name = "TxSpecies"
        Me.TxSpecies.Size = New System.Drawing.Size(184, 20)
        Me.TxSpecies.TabIndex = 23
        Me.TxSpecies.Text = "TextBox1"
        '
        'Label11
        '
        Me.Label11.Location = New System.Drawing.Point(5, 568)
        Me.Label11.Name = "Label11"
        Me.Label11.Size = New System.Drawing.Size(56, 25)
        Me.Label11.TabIndex = 24
        Me.Label11.Text = "Genus"
        '
        'TxGenus
        '
        Me.TxGenus.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxGenus.Location = New System.Drawing.Point(70, 560)
        Me.TxGenus.Name = "TxGenus"
        Me.TxGenus.Size = New System.Drawing.Size(184, 20)
        Me.TxGenus.TabIndex = 25
        Me.TxGenus.Text = "TextBox2"
        '
        'Label12
        '
        Me.Label12.Location = New System.Drawing.Point(5, 596)
        Me.Label12.Name = "Label12"
        Me.Label12.Size = New System.Drawing.Size(56, 20)
        Me.Label12.TabIndex = 26
        Me.Label12.Text = "Variety"
        '
        'TxVariety
        '
        Me.TxVariety.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxVariety.Location = New System.Drawing.Point(70, 592)
        Me.TxVariety.Name = "TxVariety"
        Me.TxVariety.Size = New System.Drawing.Size(184, 20)
        Me.TxVariety.TabIndex = 27
        Me.TxVariety.Text = "TextBox1"
        '
        'Label13
        '
        Me.Label13.Location = New System.Drawing.Point(272, 248)
        Me.Label13.Name = "Label13"
        Me.Label13.Size = New System.Drawing.Size(80, 24)
        Me.Label13.TabIndex = 28
        Me.Label13.Text = "Authority"
        '
        'TxAuthority
        '
        Me.TxAuthority.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxAuthority.Location = New System.Drawing.Point(360, 248)
        Me.TxAuthority.Name = "TxAuthority"
        Me.TxAuthority.Size = New System.Drawing.Size(184, 20)
        Me.TxAuthority.TabIndex = 29
        Me.TxAuthority.Text = "TextBox1"
        '
        'Label14
        '
        Me.Label14.Location = New System.Drawing.Point(272, 280)
        Me.Label14.Name = "Label14"
        Me.Label14.Size = New System.Drawing.Size(72, 22)
        Me.Label14.TabIndex = 30
        Me.Label14.Text = "Collected by"
        '
        'TxCollectedBy
        '
        Me.TxCollectedBy.Location = New System.Drawing.Point(360, 280)
        Me.TxCollectedBy.Name = "TxCollectedBy"
        Me.TxCollectedBy.Size = New System.Drawing.Size(184, 20)
        Me.TxCollectedBy.TabIndex = 31
        Me.TxCollectedBy.Text = "TextBox1"
        '
        'Label15
        '
        Me.Label15.Location = New System.Drawing.Point(272, 312)
        Me.Label15.Name = "Label15"
        Me.Label15.Size = New System.Drawing.Size(72, 24)
        Me.Label15.TabIndex = 32
        Me.Label15.Text = "Treatment"
        '
        'TxTreatment
        '
        Me.TxTreatment.Location = New System.Drawing.Point(360, 312)
        Me.TxTreatment.Name = "TxTreatment"
        Me.TxTreatment.Size = New System.Drawing.Size(184, 20)
        Me.TxTreatment.TabIndex = 33
        Me.TxTreatment.Text = "TextBox1"
        '
        'Label16
        '
        Me.Label16.Location = New System.Drawing.Point(272, 344)
        Me.Label16.Name = "Label16"
        Me.Label16.Size = New System.Drawing.Size(80, 24)
        Me.Label16.TabIndex = 34
        Me.Label16.Text = "Tissue"
        '
        'TxTissue
        '
        Me.TxTissue.Location = New System.Drawing.Point(360, 344)
        Me.TxTissue.Name = "TxTissue"
        Me.TxTissue.Size = New System.Drawing.Size(184, 20)
        Me.TxTissue.TabIndex = 35
        Me.TxTissue.Text = "TextBox1"
        '
        'Label17
        '
        Me.Label17.Location = New System.Drawing.Point(256, 376)
        Me.Label17.Name = "Label17"
        Me.Label17.Size = New System.Drawing.Size(104, 16)
        Me.Label17.TabIndex = 36
        Me.Label17.Text = "Cultivation Method"
        '
        'TxCultivationMethod
        '
        Me.TxCultivationMethod.Location = New System.Drawing.Point(360, 376)
        Me.TxCultivationMethod.Name = "TxCultivationMethod"
        Me.TxCultivationMethod.Size = New System.Drawing.Size(184, 20)
        Me.TxCultivationMethod.TabIndex = 37
        Me.TxCultivationMethod.Text = "TextBox1"
        '
        'Label18
        '
        Me.Label18.Location = New System.Drawing.Point(264, 603)
        Me.Label18.Name = "Label18"
        Me.Label18.Size = New System.Drawing.Size(144, 19)
        Me.Label18.TabIndex = 38
        Me.Label18.Text = "Estimate Amount in grams"
        '
        'TxEstimatedAmount
        '
        Me.TxEstimatedAmount.Location = New System.Drawing.Point(416, 598)
        Me.TxEstimatedAmount.Name = "TxEstimatedAmount"
        Me.TxEstimatedAmount.Size = New System.Drawing.Size(128, 20)
        Me.TxEstimatedAmount.TabIndex = 39
        Me.TxEstimatedAmount.Text = "TextBox1"
        '
        'Label19
        '
        Me.Label19.Location = New System.Drawing.Point(3, 628)
        Me.Label19.Name = "Label19"
        Me.Label19.Size = New System.Drawing.Size(60, 24)
        Me.Label19.TabIndex = 40
        Me.Label19.Text = "Comments"
        '
        'TxComments
        '
        Me.TxComments.Location = New System.Drawing.Point(72, 630)
        Me.TxComments.Name = "TxComments"
        Me.TxComments.Size = New System.Drawing.Size(477, 20)
        Me.TxComments.TabIndex = 41
        Me.TxComments.Text = "TextBox1"
        '
        'ButAdd
        '
        Me.ButAdd.Location = New System.Drawing.Point(565, 398)
        Me.ButAdd.Name = "ButAdd"
        Me.ButAdd.Size = New System.Drawing.Size(136, 40)
        Me.ButAdd.TabIndex = 42
        Me.ButAdd.Text = "Add Tissue"
        '
        'PictureBox1
        '
        Me.PictureBox1.Location = New System.Drawing.Point(560, 248)
        Me.PictureBox1.Name = "PictureBox1"
        Me.PictureBox1.Size = New System.Drawing.Size(144, 144)
        Me.PictureBox1.TabIndex = 43
        Me.PictureBox1.TabStop = False
        '
        'ButUpdate
        '
        Me.ButUpdate.Location = New System.Drawing.Point(567, 444)
        Me.ButUpdate.Name = "ButUpdate"
        Me.ButUpdate.Size = New System.Drawing.Size(136, 40)
        Me.ButUpdate.TabIndex = 44
        Me.ButUpdate.Text = "Update"
        '
        'ButDelete
        '
        Me.ButDelete.Location = New System.Drawing.Point(567, 492)
        Me.ButDelete.Name = "ButDelete"
        Me.ButDelete.Size = New System.Drawing.Size(136, 40)
        Me.ButDelete.TabIndex = 45
        Me.ButDelete.Text = "Delete"
        '
        'ButQuit
        '
        Me.ButQuit.Location = New System.Drawing.Point(568, 539)
        Me.ButQuit.Name = "ButQuit"
        Me.ButQuit.Size = New System.Drawing.Size(135, 40)
        Me.ButQuit.TabIndex = 46
        Me.ButQuit.Text = "Quit"
        '
        'Label21
        '
        Me.Label21.Location = New System.Drawing.Point(4, 249)
        Me.Label21.Name = "Label21"
        Me.Label21.Size = New System.Drawing.Size(76, 24)
        Me.Label21.TabIndex = 3
        Me.Label21.Text = "Description"
        '
        'TextBox2
        '
        Me.TextBox2.Location = New System.Drawing.Point(80, 280)
        Me.TextBox2.Name = "TextBox2"
        Me.TextBox2.Size = New System.Drawing.Size(178, 20)
        Me.TextBox2.TabIndex = 4
        Me.TextBox2.Text = "TextBox1"
        '
        'Label22
        '
        Me.Label22.Location = New System.Drawing.Point(8, 400)
        Me.Label22.Name = "Label22"
        Me.Label22.Size = New System.Drawing.Size(56, 24)
        Me.Label22.TabIndex = 10
        Me.Label22.Text = "Box name"
        '
        'TextBox4
        '
        Me.TextBox4.Location = New System.Drawing.Point(80, 344)
        Me.TextBox4.Name = "TextBox4"
        Me.TextBox4.Size = New System.Drawing.Size(178, 20)
        Me.TextBox4.TabIndex = 8
        Me.TextBox4.Text = "TextBox1"
        '
        'CheckBox1
        '
        Me.CheckBox1.Location = New System.Drawing.Point(80, 368)
        Me.CheckBox1.Name = "CheckBox1"
        Me.CheckBox1.Size = New System.Drawing.Size(184, 24)
        Me.CheckBox1.TabIndex = 9
        Me.CheckBox1.Text = "Available"
        '
        'DataGrid2
        '
        Me.DataGrid2.DataMember = ""
        Me.DataGrid2.HeaderForeColor = System.Drawing.SystemColors.ControlText
        Me.DataGrid2.Location = New System.Drawing.Point(0, 0)
        Me.DataGrid2.Name = "DataGrid2"
        Me.DataGrid2.Size = New System.Drawing.Size(712, 240)
        Me.DataGrid2.TabIndex = 0
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(274, 410)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(64, 24)
        Me.Label1.TabIndex = 47
        Me.Label1.Text = "GPS Unit"
        '
        'TxGPS_Unit
        '
        Me.TxGPS_Unit.Location = New System.Drawing.Point(360, 408)
        Me.TxGPS_Unit.Name = "TxGPS_Unit"
        Me.TxGPS_Unit.Size = New System.Drawing.Size(184, 20)
        Me.TxGPS_Unit.TabIndex = 48
        Me.TxGPS_Unit.Text = "TextBox1"
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(275, 442)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(53, 24)
        Me.Label2.TabIndex = 49
        Me.Label2.Text = "X_GPS"
        '
        'TxX_GPS
        '
        Me.TxX_GPS.Location = New System.Drawing.Point(360, 440)
        Me.TxX_GPS.Name = "TxX_GPS"
        Me.TxX_GPS.Size = New System.Drawing.Size(184, 20)
        Me.TxX_GPS.TabIndex = 50
        Me.TxX_GPS.Text = "TextBox1"
        '
        'Label8
        '
        Me.Label8.Location = New System.Drawing.Point(275, 472)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(80, 24)
        Me.Label8.TabIndex = 51
        Me.Label8.Text = "Y_GPS"
        '
        'TxY_GPS
        '
        Me.TxY_GPS.Location = New System.Drawing.Point(360, 472)
        Me.TxY_GPS.Name = "TxY_GPS"
        Me.TxY_GPS.Size = New System.Drawing.Size(184, 20)
        Me.TxY_GPS.TabIndex = 52
        Me.TxY_GPS.Text = "TextBox1"
        '
        'Label20
        '
        Me.Label20.Location = New System.Drawing.Point(276, 506)
        Me.Label20.Name = "Label20"
        Me.Label20.Size = New System.Drawing.Size(72, 22)
        Me.Label20.TabIndex = 53
        Me.Label20.Text = "Z_GPS"
        '
        'TxZ_GPS
        '
        Me.TxZ_GPS.Location = New System.Drawing.Point(360, 504)
        Me.TxZ_GPS.Name = "TxZ_GPS"
        Me.TxZ_GPS.Size = New System.Drawing.Size(184, 20)
        Me.TxZ_GPS.TabIndex = 54
        Me.TxZ_GPS.Text = "TextBox1"
        '
        'Label23
        '
        Me.Label23.Location = New System.Drawing.Point(275, 536)
        Me.Label23.Name = "Label23"
        Me.Label23.Size = New System.Drawing.Size(72, 24)
        Me.Label23.TabIndex = 55
        Me.Label23.Text = "Datum"
        '
        'TxDatum
        '
        Me.TxDatum.Location = New System.Drawing.Point(360, 536)
        Me.TxDatum.Name = "TxDatum"
        Me.TxDatum.Size = New System.Drawing.Size(184, 20)
        Me.TxDatum.TabIndex = 56
        Me.TxDatum.Text = "TextBox1"
        '
        'Label24
        '
        Me.Label24.Location = New System.Drawing.Point(275, 568)
        Me.Label24.Name = "Label24"
        Me.Label24.Size = New System.Drawing.Size(79, 20)
        Me.Label24.TabIndex = 57
        Me.Label24.Text = "Accuracy"
        '
        'TxAccuracy
        '
        Me.TxAccuracy.Location = New System.Drawing.Point(360, 568)
        Me.TxAccuracy.Name = "TxAccuracy"
        Me.TxAccuracy.Size = New System.Drawing.Size(184, 20)
        Me.TxAccuracy.TabIndex = 58
        Me.TxAccuracy.Text = "TextBox1"
        '
        'cbLocation
        '
        Me.cbLocation.Location = New System.Drawing.Point(72, 404)
        Me.cbLocation.Name = "cbLocation"
        Me.cbLocation.Size = New System.Drawing.Size(184, 21)
        Me.cbLocation.TabIndex = 59
        Me.cbLocation.Text = "ComboBox1"
        '
        'FrTissue
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(712, 662)
        Me.Controls.Add(Me.cbLocation)
        Me.Controls.Add(Me.TxAccuracy)
        Me.Controls.Add(Me.Label24)
        Me.Controls.Add(Me.TxDatum)
        Me.Controls.Add(Me.Label23)
        Me.Controls.Add(Me.TxZ_GPS)
        Me.Controls.Add(Me.Label20)
        Me.Controls.Add(Me.TxY_GPS)
        Me.Controls.Add(Me.Label8)
        Me.Controls.Add(Me.TxX_GPS)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.TxGPS_Unit)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.ButQuit)
        Me.Controls.Add(Me.ButDelete)
        Me.Controls.Add(Me.ButUpdate)
        Me.Controls.Add(Me.PictureBox1)
        Me.Controls.Add(Me.ButAdd)
        Me.Controls.Add(Me.TxComments)
        Me.Controls.Add(Me.Label19)
        Me.Controls.Add(Me.TxEstimatedAmount)
        Me.Controls.Add(Me.Label18)
        Me.Controls.Add(Me.TxCultivationMethod)
        Me.Controls.Add(Me.Label17)
        Me.Controls.Add(Me.TxTissue)
        Me.Controls.Add(Me.Label16)
        Me.Controls.Add(Me.TxTreatment)
        Me.Controls.Add(Me.Label15)
        Me.Controls.Add(Me.TxCollectedBy)
        Me.Controls.Add(Me.Label14)
        Me.Controls.Add(Me.TxAuthority)
        Me.Controls.Add(Me.Label13)
        Me.Controls.Add(Me.TxVariety)
        Me.Controls.Add(Me.Label12)
        Me.Controls.Add(Me.TxGenus)
        Me.Controls.Add(Me.Label11)
        Me.Controls.Add(Me.TxSpecies)
        Me.Controls.Add(Me.Label10)
        Me.Controls.Add(Me.TxSpeciesCode)
        Me.Controls.Add(Me.Label9)
        Me.Controls.Add(Me.cbType)
        Me.Controls.Add(Me.Type)
        Me.Controls.Add(Me.TxDatecollected)
        Me.Controls.Add(Me.Label7)
        Me.Controls.Add(Me.Label6)
        Me.Controls.Add(Me.TxBoxName)
        Me.Controls.Add(Me.Label5)
        Me.Controls.Add(Me.ckAvailable)
        Me.Controls.Add(Me.TxRow)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.TxColumn)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.TxDescription)
        Me.Controls.Add(Me.DataGrid1)
        Me.Controls.Add(Me.Label21)
        Me.Controls.Add(Me.TextBox2)
        Me.Controls.Add(Me.Label22)
        Me.Controls.Add(Me.TextBox4)
        Me.Controls.Add(Me.CheckBox1)
        Me.Controls.Add(Me.DataGrid2)
        Me.Name = "FrTissue"
        Me.Text = "FrTissue"
        CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DataGrid2, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

#End Region
    'This source code has been developed by Cuong Pham (cuong@nmsu.edu) & Mary Lucero
    'Any use of this software MUST contain this message
    Dim ID As String
    Dim Mode As Integer
    Private Sub FrTissue_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ShowToolTip()
        Load_Tissue()
    End Sub
    Private Sub Load_Tissue()
        Init()
        Dim sSQL As String
        Dim sSQL1 As String
        Dim connString As String = strConn
        Dim myConnection As OleDb.OleDbConnection = New OleDb.OleDbConnection
        myConnection.ConnectionString = connString
        ' create a data adapter
        sSQL = "SELECT TissueID,Description,Column1,Row,Available " & _
        " ,BoxName,Location,DateCollected,Type,SpeciesCode,Species,Genus,Variety " & _
        " ,Authority, CollectedBy, Treatment, Tissue, CultivationMethod, GPS_Unit,X_GPS," & _
        " Y_GPS, Z_GPS,Datum,Accuracy,estimatedAmount, " & _
        " Comments FROM Tissues ORDER BY TissueID"
        sSQL1 = "SELECT * FROM Tissues ORDER BY TissueID"
        Dim da As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter(sSQL1, myConnection)
        ' create a new dataset 
        Dim ds As DataSet = New DataSet
        ' fill dataset 
        da.Fill(ds, "Tissues")

        ' write dataset contents to an xml file by calling WriteXml method 
        ' Attach DataSet to DataGrid

        DataGrid1.DataSource = ds.DefaultViewManager
        DataGrid1.DataMember = "Tissues"
        DataGrid1.ColumnHeadersVisible = True
        DataGrid1.Refresh()

        TxDescription.Text = ""
        TxColumn.Text = ""
        TxRow.Text = ""
        ckAvailable.Checked = True
        TxBoxName.Text = ""
        cbLocation.Items.Clear()
        FillComboBox(cbLocation, "cbLocation", "Location")
        cbLocation.Text = ""

        TxDatecollected.Text = ""

        cbType.Items.Clear()
        cbType.Items.Add("Plant")
        cbType.Items.Add("Fungal Isolate")
        cbType.Items.Add("Animal")
        cbType.Items.Add("Bacterial")
        cbType.Text = ""

        TxSpeciesCode.Text = ""
        TxSpecies.Text = ""
        TxGenus.Text = ""
        TxVariety.Text = ""

        TxAuthority.Text = ""
        TxCollectedBy.Text = ""
        TxTreatment.Text = ""
        TxTissue.Text = ""
        TxCultivationMethod.Text = ""

        TxGPS_Unit.Text = ""
        TxX_GPS.Text = "0.0"
        TxY_GPS.Text = "0.0"
        TxZ_GPS.Text = "0.0"
        TxDatum.Text = ""
        TxAccuracy.Text = ""

        TxEstimatedAmount.Text = ""
        TxComments.Text = ""
    End Sub
    Private Sub DataGrid1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DataGrid1.Click
        Dim i As Integer
        Dim t As Boolean
        t = False

        i = 0
        Flush()
        Mode = 1
        On Error Resume Next
        While (t = False)
            If DataGrid1.IsSelected(i) Then
                ID = CInt(DataGrid1.Item(i, 0))
                TxDescription.Text = DataGrid1.Item(i, 1)
                TxColumn.Text = DataGrid1.Item(i, 2)
                TxRow.Text = DataGrid1.Item(i, 3)
                ckAvailable.Checked = DataGrid1.Item(i, 4)
                TxBoxName.Text = DataGrid1.Item(i, 5)
                cbLocation.Text = DataGrid1.Item(i, 6)
                TxDatecollected.Text = DataGrid1.Item(i, 7)

                cbType.Text = DataGrid1.Item(i, 8)

                TxSpeciesCode.Text = DataGrid1.Item(i, 9)
                TxSpecies.Text = DataGrid1.Item(i, 10)
                TxGenus.Text = DataGrid1.Item(i, 11)
                TxVariety.Text = DataGrid1.Item(i, 12)

                TxAuthority.Text = DataGrid1.Item(i, 13)
                TxCollectedBy.Text = DataGrid1.Item(i, 14)
                TxTreatment.Text = DataGrid1.Item(i, 15)
                TxTissue.Text = DataGrid1.Item(i, 16)
                TxCultivationMethod.Text = DataGrid1.Item(i, 17)
                TxGPS_Unit.Text = DataGrid1.Item(i, 18)
                TxX_GPS.Text = DataGrid1.Item(i, 19)
                TxY_GPS.Text = DataGrid1.Item(i, 20)
                TxZ_GPS.Text = DataGrid1.Item(i, 21)
                TxDatum.Text = DataGrid1.Item(i, 22)
                TxAccuracy.Text = DataGrid1.Item(i, 23)

                TxEstimatedAmount.Text = DataGrid1.Item(i, 24)
                TxComments.Text = DataGrid1.Item(i, 25)


                ButUpdate.Enabled = True
                ButDelete.Enabled = True
                t = True
            End If
            i = i + 1
        End While
    End Sub
    Private Sub ButQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButQuit.Click
        Me.Hide()
        'CloseConn()
    End Sub
    Private Sub Flush()

        TxDescription.Text = ""
        TxColumn.Text = ""
        TxRow.Text = ""
        ckAvailable.Checked = True
        TxBoxName.Text = ""
        cbLocation.Text = ""
        TxDatecollected.Text = ""


        cbType.Text = ""

        TxSpeciesCode.Text = ""
        TxSpecies.Text = ""
        TxGenus.Text = ""
        TxVariety.Text = ""

        TxAuthority.Text = ""
        TxCollectedBy.Text = ""
        TxTreatment.Text = ""
        TxTissue.Text = ""
        TxCultivationMethod.Text = ""

        TxGPS_Unit.Text = ""
        TxX_GPS.Text = "0.0"
        TxY_GPS.Text = "0.0"
        TxZ_GPS.Text = "0.0"
        TxDatum.Text = ""
        TxAccuracy.Text = ""

        TxEstimatedAmount.Text = ""
        TxComments.Text = ""

    End Sub
    Private Sub ShowToolTip()
        Dim toolTip1 As New ToolTip

        ' Set up the delays for the ToolTip.
        toolTip1.AutoPopDelay = 5000
        toolTip1.InitialDelay = 1000
        toolTip1.ReshowDelay = 500
        ' Force the ToolTip text to be displayed whether or not the form is active.
        toolTip1.ShowAlways = True

        ' Set up the ToolTip text for the Button and Checkbox.
        toolTip1.SetToolTip(Me.Label21, "Description given to sample at the time it was collected joined with an underscore to the autogenerated Tissue number")
        toolTip1.SetToolTip(Me.Label3, "Location of sample within a box")
        toolTip1.SetToolTip(Me.Label4, "Location of sample within a box")
        toolTip1.SetToolTip(Me.ckAvailable, "Check if the sample is available in the in storage. Remove checkmark whenever you use the last of a sample")
        toolTip1.SetToolTip(Me.Label5, "Name of the box tissue is stored in")
        toolTip1.SetToolTip(Me.Label6, "Where preserved form is located (eg. Freeze #2)")
        toolTip1.SetToolTip(Me.Type, "What type of tissue is the sample (i.e. plant, fungal, bacterial, animal,soil, water...)")
        toolTip1.SetToolTip(Me.Label9, "The symbol used to identify this species in the USDA_NRCS Plants database http://plants.usda.gov/")
        toolTip1.SetToolTip(Me.Label10, "taxonomic group whose members can interbreed")
        toolTip1.SetToolTip(Me.Label11, "taxonomic group containing one or more species ")
        toolTip1.SetToolTip(Me.Label12, "a lineage or race (breed, strain, cultivar, etc.)")
        toolTip1.SetToolTip(Me.Label13, "individual(s) responsible for the name")
        toolTip1.SetToolTip(Me.Label14, "person who collected or cultured the material")
        toolTip1.SetToolTip(Me.Label15, "was the sample/tissue changed in any way (i.e. Black gramma innoculated)?")
        toolTip1.SetToolTip(Me.Label16, "The tissue of the organism (this will usually be a plant) from which sample was taken. Eg. whole,root,leaf,callus,seed...")
        toolTip1.SetToolTip(Me.Label1, "The make and model of the GPS unit used to map the geographic location of the site where the plant was sampled. This is only important for field collected samples")
        toolTip1.SetToolTip(Me.Label2, "X_GPS coordinate of the sampling site, based on Zone 13 of the UTM Coordinate System. This is only important for field collected samples")
        toolTip1.SetToolTip(Me.Label8, "Y_GPS coordinate of the sampling site, based on Zone 13 of the UTM Coordinate System. This is only important for field collected samples")
        toolTip1.SetToolTip(Me.Label20, "Z_GPS coordinate of the sampling site, based on Zone 13 of the UTM Coordinate System. This is only important for field collected samples")
        toolTip1.SetToolTip(Me.Label23, "The reference against which surface points are measure. This is only important for field collected samples")
        toolTip1.SetToolTip(Me.Label24, "The estimated accuracy of the GPS measurement. This is only important for field collected samples")
        toolTip1.SetToolTip(Me.Label18, "amount of tissue obtained. Specify whether this represents fresh weight (FW) or dry weight(DW). Be sure to update this as tissue is used")
        toolTip1.SetToolTip(Me.Label12, "Any further information needed on this particular tissue sample")
    End Sub

    Private Sub ButAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButAdd.Click

        TxDescription.Text = ""
        TxColumn.Text = ""
        TxRow.Text = ""
        ckAvailable.Checked = True
        TxBoxName.Text = ""
        cbLocation.Text = ""
        TxDatecollected.Text = ""


        cbType.Text = ""

        TxSpeciesCode.Text = ""
        TxSpecies.Text = ""
        TxGenus.Text = ""
        TxVariety.Text = ""

        TxAuthority.Text = ""
        TxCollectedBy.Text = ""
        TxTreatment.Text = ""
        TxTissue.Text = ""
        TxCultivationMethod.Text = ""

        TxGPS_Unit.Text = ""
        TxX_GPS.Text = "0.0"
        TxY_GPS.Text = "0.0"
        TxZ_GPS.Text = "0.0"
        TxDatum.Text = ""
        TxAccuracy.Text = ""

        TxEstimatedAmount.Text = ""
        TxComments.Text = ""
        ButUpdate.Enabled = True
        ButDelete.Enabled = False
        Mode = 0
        TxDescription.Focus()
        'CloseConn()
    End Sub


    Private Sub ButUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButUpdate.Click
        Dim strSQL As String
        Dim sSQL As String

        'On Error Resume Next

        OpenConn()
        If Mode = 0 Then

            strSQL = "INSERT INTO Tissues (Description,Column1,Row, Available," & _
            "BoxName,Location,DateCollected,Type,SpeciesCode,Species,Genus,Variety," & _
            "Authority,CollectedBy,Treatment,Tissue,CultivationMethod,GPS_Unit," & _
            "X_GPS,Y_GPS,Z_GPS,Datum,Accuracy,EstimatedAmount,Comments) " & _
            "  VALUES ('" & TxDescription.Text & _
            "','" & TxColumn.Text & _
            "','" & TxRow.Text & _
            "'," & ckAvailable.Checked & _
            ",'" & TxBoxName.Text & _
            "','" & cbLocation.Text & _
            "','" & TxDatecollected.Text & _
            "','" & cbType.Text & _
            "','" & TxSpeciesCode.Text & _
            "','" & TxSpecies.Text & _
            "','" & TxGenus.Text & _
            "','" & TxVariety.Text & _
            "','" & TxAuthority.Text & _
            "','" & TxCollectedBy.Text & _
            "','" & TxTreatment.Text & _
            "','" & TxTissue.Text & _
            "','" & TxCultivationMethod.Text & _
            "','" & TxGPS_Unit.Text & _
            "'," & CDbl(TxX_GPS.Text) & _
            "," & CDbl(TxY_GPS.Text) & _
            "," & CDbl(TxZ_GPS.Text) & _
            ",'" & TxDatum.Text & _
            "','" & TxAccuracy.Text & _
            "','" & TxEstimatedAmount.Text & _
            "','" & TxComments.Text & "')"


            Dim myConnection As New OleDb.OleDbConnection(strConn)
            Dim myCmd As New OleDb.OleDbCommand(strSQL, myConnection)
            myConnection.Open()
            myCmd.Connection = myConnection
            myCmd.ExecuteNonQuery()
            myCmd.Dispose()


            Init()

            Dim myCon As OleDb.OleDbConnection = New OleDb.OleDbConnection
            myCon.ConnectionString = strConn
            ' create a data adapter 
            Dim da As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter("Select * FROM Tissues ORDER BY TissueID", myConnection)

            ' create a new dataset 
            Dim ds As DataSet = New DataSet
            ' fill dataset 
            da.Fill(ds, "Tissues")

            ' write dataset contents to an xml file by calling WriteXml method 
            ' Attach DataSet to DataGrid

            DataGrid1.DataSource = ds.DefaultViewManager
            DataGrid1.ColumnHeadersVisible = True
            DataGrid1.Refresh()

            da.Dispose()
            ds.Dispose()
            myCon.Close()

        End If



        If Mode = 1 Then


            strSQL = "UPDATE Tissues SET Description='" & TxDescription.Text & _
            "',Column1='" & TxColumn.Text & _
            "',Row='" & TxRow.Text & _
            "',Available=" & ckAvailable.Checked & _
            ",BoxName='" & TxBoxName.Text & _
            "',Location='" & cbLocation.Text & _
            "',Datecollected='" & TxDatecollected.Text & _
            "',Type='" & cbType.Text & _
            "',SpeciesCode='" & TxSpeciesCode.Text & _
            "',Species='" & TxSpecies.Text & _
            "',Genus='" & TxGenus.Text & _
            "',Variety='" & TxVariety.Text & _
            "',Authority='" & TxAuthority.Text & _
            "',CollectedBy='" & TxCollectedBy.Text & _
            "',Treatment='" & TxTreatment.Text & _
            "',Tissue='" & TxTissue.Text & _
            "',CultivationMethod='" & TxCultivationMethod.Text & _
            "',GPS_Unit='" & TxGPS_Unit.Text & _
            "',X_GPS=" & CDbl(TxX_GPS.Text) & _
            ",Y_GPS=" & CDbl(TxY_GPS.Text) & _
            ",Z_GPS=" & CDbl(TxZ_GPS.Text) & _
            ",Datum='" & TxDatum.Text & _
            "',Accuracy='" & TxAccuracy.Text & _
            "',EstimatedAmount='" & TxEstimatedAmount.Text & _
            "',Comments='" & TxComments.Text & "' WHERE TissueID= " & ID



            Dim myCommand As New OleDb.OleDbCommand(strSQL)
            myCommand.Connection = myConnection
            myCommand.ExecuteNonQuery()

            DataGrid1.Item(DataGrid1.CurrentRowIndex, 0) = ID
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 1) = TxDescription.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 2) = TxColumn.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 3) = TxRow.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 4) = ckAvailable.Checked
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 5) = TxBoxName.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 6) = cbLocation.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 7) = TxDatecollected.Text

            DataGrid1.Item(DataGrid1.CurrentRowIndex, 8) = cbType.Text

            DataGrid1.Item(DataGrid1.CurrentRowIndex, 9) = TxSpeciesCode.Text()
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 10) = TxSpecies.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 11) = TxGenus.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 12) = TxVariety.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 13) = TxAuthority.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 14) = TxCollectedBy.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 15) = TxTreatment.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 16) = TxTissue.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 17) = TxCultivationMethod.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 18) = TxGPS_Unit.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 19) = TxX_GPS.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 20) = TxY_GPS.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 21) = TxZ_GPS.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 22) = TxDatum.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 23) = TxAccuracy.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 24) = TxEstimatedAmount.Text
            DataGrid1.Item(DataGrid1.CurrentRowIndex, 25) = TxComments.Text

            myCommand.Dispose()

        End If

        myConnection.Close()

    End Sub

    Private Sub ButDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButDelete.Click
        On Error Resume Next
        Dim msg As String
        Dim title As String
        Dim style As MsgBoxStyle
        Dim response As MsgBoxResult
        msg = "Do you  really want to delete the Tissue ID :" & ID & " ?"  ' Define message.
        style = MsgBoxStyle.DefaultButton2 Or _
           MsgBoxStyle.Critical Or MsgBoxStyle.YesNo
        title = "Delete Comfirmation"   ' Define title.
        ' Display message.
        response = MsgBox(msg, style, title)
        If response = MsgBoxResult.Yes Then   ' User chose Yes.

            strSQL = "DELETE FROM Tissues  WHERE TissueID=" & ID
            OpenConn()

            Dim myCommand As New OleDb.OleDbCommand(strSQL)
            myCommand.Connection = myConnection
            myCommand.ExecuteNonQuery()
            DataGrid1.Refresh()
            myCommand.Dispose()
            myConnection.Close()
            Load_Tissue()
        Else
            ' Perform some other action.
        End If
    End Sub
End Class
