Hi Linda,
You could add to the KeyPress method of your checkbox something like this
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode <> 32 && Add here other valid keys, like tab, enter etc
NODEFAULT
ENDIF
But you will still have the problem with other controls, for example same happens if a command button has the focus
>A user noted that when a checkbox control has focus and a letter for one of the hot keys is pressed (e.g., D for the delete button), the hot key fires without requiring Alt+D to be pressed.
>Now I realize that the user should not be pressing anything besides Enter or Space when on a checkbox control but . . .
>Does anyone have any suggestions other than 1) setting the tabstop property to false; 2) eliminating the hot keys; 3) training the users?
>Thanks.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges