do nothing upon hitting tab key

  • Thread starter Thread starter Jesper F
  • Start date Start date
J

Jesper F

I know of the cycle property of the form for controlling
the tab cycle.
But is it possible to have the cursor stay in the last
field of the form and not go anywhere, not even to the
first field.
Is there a way of preventing the cursor from moving out of
the field?
 
I don't think so. The lost focus event doesn't help,
although putting in the line me.txtABC.setfocus in this
event seems to fire twice for some reason.
Geof.
 
I know of the cycle property of the form for controlling
the tab cycle.
But is it possible to have the cursor stay in the last
field of the form and not go anywhere, not even to the
first field.
Is there a way of preventing the cursor from moving out of
the field?

Sure, in the last controls key down event, just put the following:

if KeyCode = vbTab then
KeyCode = 0
end if

The above will simply throw the tab keypress into a black hole...
 
Back
Top