I have a textbox field on a form.
At the bottom of the form, I have a push button to a foreign character listbox on another form. Whilst editing the textbox field, I want to return a selected foreign character back from the listbox/form, and insert it into the textbox at the position I was last when I hit the push button.
This is my code in the push button's click event -
LOCAL cChar
cChar = ""
nSelStart = THISFORM.txtAddress.SelStart
DO FORM eForeign TO cChar
WITH THISFORM.txtAddress
IF !EMPTY(cChar)
.Value = STUFF(.Value,.SelStart + 1,0,cChar)
.Refresh()
ENDIF
.SetFocus()
ENDWITH
Unfortunately, it doesn't work. Mainly because "nSelStart" always is returned as zero - I checked it out through the debugger.
Can anyone please provide a solution. I have searched the "thread" without success.
Thanx in anticipation.
Rex Toomey
Australia.
Rex Toomey
ISD Port Macquarie NSW
Australia
'Inside every older person is a younger person wondering what happened.'