I thought that if I wanted to exit the ComboBox (VFP7) I could press
ESC and in the KeyPress Event I would RETURN 0. This seems to fire
the Valid event, where I am checking for LASTKEY() = 27 and once again
returning 0. Does not seem to work. What important steps am I
missing here?

Thanks for your help

Re: Combo and Exit Routine by David

David
Tue Jan 04 22:00:31 CST 2005

Jim,

Check the help for the Valid event.

return N from valid tells how many controls to skip forward, return -N skips
backwards, return 0 means the control will retain focus.

You want to return .t. in your valid when you detect the esc key.

--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro

"Jim" <jimDontWantAnyEmail.com> wrote in message
news:lnfmt01i0e4auvpbtb7jlkltl8p6goi9vj@4ax.com...
>I thought that if I wanted to exit the ComboBox (VFP7) I could press
> ESC and in the KeyPress Event I would RETURN 0. This seems to fire
> the Valid event, where I am checking for LASTKEY() = 27 and once again
> returning 0. Does not seem to work. What important steps am I
> missing here?
>
> Thanks for your help