title: MS Access VBA: get selected portion of text from text box?
body: <p>I'm having trouble find a way to achieve this. Bascially, I just need a way to get the selected portion of text within a text box. The idea is that a user can double click a word within a larger string to automatically search against another set of data. </p>
  
  <p>If can get the below to work, the selected text will simply call a function that runs my search process. The below does not work and many of my online finds only capture the whole text box. Any ideas?</p>
  
  <pre><code>Private Sub txtproductName_DblClick(Cancel As Integer)
      Debug.Print txtproductName.SelText
  End Sub
  </code></pre>