Hi Jim,
Actually, originally I had something like this. But when the combobox is in a grid, the user wants to be moved to the next/previous line and this wouldn't do the trick, so I came up with the code I have now.
My biggest concern though is that if the code works in a combobox, why doesn't it work when the code is in the combobox class? Is this a bug?
>Colin,
>
>Try this instead.
>
>
>.KeyPress Event
>IF This.Style=2 AND This.mlListLikeCombo
> IF nKeyCode=5
> KEYBOARD "{BACKTAB}"
> NODEFAULT
> ENDIF
> IF nKeyCode=24
> KEYBOARD "{TAB}"
> NODEFAULT
> ENDIF
>ENDIF
>
>
>You won't need the Valid code anyore because you aren't changing the style for the combo.
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada
cmagee@metroland.comNever mistake having a career with having a life.