do nothing upon hitting tab key

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?
 
G

Geof Wyght

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.
 
A

Albert D. Kallal

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top