>i have set the TabStop=.F. for all CommandButtons in Container but after this when i press Up/Down arrow to goto next/Previous CommandButton then also it comes out of Container.
>
>may you send me a sample form at :
>mk_common@yahoo.com
>
>Thanks & Warm regards,
>mk.
First I have to say you might be putting too much work into making a form keyboard friendly. My observations watching users today ( and I see a lot of them ) is that just about all of them only use the mouse for these operations.
Having said that, the only way I can think of that you can get the thing to work the way you want is to put code in the KeyPress Event of each button to have the arrow keys set focus to the next desired button. Here is a sample:
In this example you are sitting on Button 2. Placing this code in Button two would cause the Button 1 or Button 3 to get focus depending on what key was hit. For up (5) and down (24) arrows use these values. You would need to place this code in every button you want to control changing the target buttons in each one. By the way, leave the tab off.
Lparameters nKeyCode, nShiftAltCtrl
If nKeyCode = 19
Thisform.cntMenu.cmdButton1.SetFocus()
NoDefault
Else
If nKeyCode = 4
Thisform.cntMenu.cmdButton3.SetFocus()
NoDefault
Endif
Endif
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn