>I am using VFP 6 but it runs the same in 5
>
>I run a form and pass a variable to the init lets say 1 to 5 as a string. In the init I use SetFocus() to set the focus to a button based on the value passed.
>
>Now in the form the user tabs, or uses the mouse to place the focus in a text box. When the user hits the enter key the Click() event for the button that had the focus set to it in the init fires even though it no longer has focus. What I expected to happen was the focus to go to the next textbox.
>
>Is this a Bug or should it work that way?
>
>Thanks
It makes the DEFAULT property of the commandbutton to true. I don't if it's a bug or not but if SETFOCUS() in the activate, it will work.
- Jayesh