>Bret,
>
>Here's code that works for me;
>
> DODEFAULT()
> THIS.SelStart = LEN(EVAL(THIS.ControlSource))
> THIS.SelLength = 0
> NODEFAULT
>
>I didn't mention that you must do a DoDefault() at the start so focus will get to the editbox, but then you chage the selstart and sellength and issue a NODEFAULT to prevent the default setting from occuring after your settings. Essentially you are making the default code run BEFORE your code.
>
>BTW, I also noticed that if you don't set the sellength the insertion point ends up inthe wrong place.
Jim that worked just fine and thanks for your time. We are now trying to figure out where it will affect other code we have and
just why that works in the gotfocus and not in the when. Again I thank you for your time
Bret Hobbs
"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope