Copy a selected word into a Public Variable

Anthony George

Registered User.
Local time
Today, 19:04
Joined
May 28, 2004
Messages
105
Hi Everyone

I have a PoPup form with a textbox that displays text from a database search.

What I want, is for the user to be able to double-click on a word that they don't understand, the word will then be selected and I need to Copy just that one word into a Public Variable so that i can do a look-up on the internet.

I can do the Internet part, it's copying the word into a variable that I'm stuck on.

Many Thanks

Kindest Regards

Tony
 
Unfortunately, putting code into the Double-Click event doesn't work, because Access insists on executing that code before highlighting (selecting) the word in question. But you can accomplish your goal by Double-Clicking to highlight the word then exiting the Textbox that holds your text:
Code:
Private Sub YourTextBoxName_LostFocus()
 YourVariable = YourTextBoxName.SelText
End Sub
You could then use the same LostFocus event to do your internet lookup.

Linq ;0)>
 
Hi Missinglinq

Thankyou for your reply. Using this method I have been able to solve the problem.

Many Thank's again

Tony
 
Unfortunately, putting code into the Double-Click event doesn't work, because Access insists on executing that code before highlighting (selecting) the word in question. But you can accomplish your goal by Double-Clicking to highlight the word then exiting the Textbox that holds your text:
Code:
Private Sub YourTextBoxName_LostFocus()
 YourVariable = YourTextBoxName.SelText
End Sub
You could then use the same LostFocus event to do your internet lookup.

Linq ;0)>
Very right well done
 

Users who are viewing this thread

Back
Top Bottom