title: SELECT value from DataTable
body: <p>I have a <code>datatable</code> that is shown in a <code>DataGridView</code>. </p>
  
  <p>I would like a user to select a value in the <code>datagridview</code> and it use that value as the filter to lookup another value in a <code>datatable</code>.</p>
  
  <p>so something like:</p>
  
  <pre><code>SELECT col2 from DataTable2 where col1= 
  (value in selected cell of the DataGridView)
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>OK, I've added some extra information as not sure I'm asking the right question:</p>
  
  <p>I have a tooltip on a <code>datagridview</code> like below:</p>
  
  <pre><code>Sub dataGridView1_CellFormatting(ByVal sender As Object, _
      ByVal e As DataGridViewCellFormattingEventArgs) _
      Handles DataGridView1.CellFormatting
  
      If e.ColumnIndex = Me.DataGridView1.Columns("Last Stop").Index _
          AndAlso (e.Value IsNot Nothing) Then
  
          With Me.DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex)
  
              .ToolTipText = '(THIS IS WHERE I'M STUCK)
  
          End With
  
      End If
  
  End Sub
  </code></pre>
  
  <p>The bit I'm stuck at above is where i want to use the value in <code>Last Stop</code> so <code>e.Value</code> to look up a name in my DataTable - </p>
  
  <blockquote>
    <p>ToolTipSN.Tables("DT_ToolTip")</p>
  </blockquote>