text positions in a textbox
Hey all.
I am working on my movie database and came up on a question
I wrote a piece of code where the actor list, separated by commas is bound to a regular textbox.
When I drag the cursor across a person's name, a new form opens with that person's pic and data
To enhance that feature, I did a quicksearch box where I begin typing the actor's name and on txtActors_Change, the code runs a Query "Actors Like 'txtActors.text & *', I guess you get the picture. So I've reached the next step, where I want to add two features:
1. When the Query runs, it moves the RS forward to the next record wherein the name matches. I'd like for it to highlight the text in the textbox that matches the query text (even if it is just the first match in the textbox)
2. I'd like to be able to doubleclick a position on the textbox (for example, between the letters of someone's name) and return a string (by locating the commas on either side) that I can then extract the entire name from to make the info form pop up. The reason for that is simply that it's slightly annoying to have to click down exactly at the person's name and drag over just to the end of his name.
Both of these would require some sort of position information. What I'm afraid of is that it will require a richtextbox,which i usually avoid because I'm not too familiar with them.
Anybody done anything like this?
Do you have a sample code?
Does it have to be rtb?
Thanks
Wengang