Can you please explain little bit more about SelStart and
SelLength. Please post sample code here if you can.
I was a bit vague because you did not say where you would get the hint
values from. I guess it's something like this (as you may guess, this is
untested air code):-
Private Sub txtMyData_Change()
Dim strOld as String
Dim strNew as String
' preserve the current value
' if it's empty, coerce the Null into an empty string
strOld = txtMyData.Text & ""
' don't bother if it's empty
If Len(strOld) = 0 then Exit Sub
' get the hint from somewhere: this could be list of values
' or a recordset or whatever
strNew = GetLookupValue(strOld)
' if there's nothing to show, give up
' Note that Len() is much faster than string comparison
If Len(strNew) = Len(strOld) Then Exit Sub
' okay, put the new string into the textbox
txtMyData.Text = strNew
' set the selection to the non-overlapping part
' for example, if it's "Davi" and "Davies", then
' you want to highlight the "es"
txtMyData.SelStart = Len(strOld)
txtMyData.SelLength = Len(strNew) - Len(strOld)
End Sub
Hope that helps
Tim F