Keybinding for Tab key in protected form

L

Lisa

I'm working on some protected forms that must have the same layout/design as
forms that already exist in hardcopy. That is, the sequence/layout of the
form fields is a "given."

Unfortunately, with the given layout, the sequence when tabbing through the
fields is (logically) something like this: 2, 3, 1; 5, 6, 4; etc. I'd like
the sequence to be 1, 2, 3; 4, 5, 6; etc.

I tried using a "goto field" exit macro, but then the user MUST go through
the fields in a given sequence (Shift+Tab and mouse click don't take you
where you expect/want to go). I also tried keybindings -- which I got to work
for just about everything EXCEPT the Tab key.

Then I ran across this statement in an MVP's site: “When the cursor is
situated in a form field in a protected section of a protected document, the
tab key isn't interpreted as a tab key. Instead, it executes a built-in
routine that lies beyond vba's reach.â€

Just wanted to verify it is true that there is no way to control the Tab key
action in a protected Word form -- short of "goto to field" macros on exiting
the field, which is unacceptable for this use.

Thanks in advance for any additional info on this issue!
 
L

Lisa

Thanks, Stefan. I do appreciate the suggestion, but am looking for something
a bit more flexible.

I tried the approach mentioned in the article you cite. It uses "goto field
(or bookmark)" when you exit a field, which doesn't work for this situation.
Using this approach, it's not just the Tab key that moves me through the
fields in a set sequece -- it takes me through the fields in the predefined
order no matter what I do. For example, if I'm in field 3, and press
Shift+Tab, I go to field 4 (not 2, as I normally would). And if I'm in field
3 and click my mouse in field 7, I still go to field 4...

That's why I tried keybinding for the Tab key (was going to tie the "goto"
routine to the Tab key, rather than exiting the field, so Shift+Tab and mouse
clicks would work as expected). However, couldn't get keybinding to work for
Tab in a protected form... (Got it to work fine for Enter/Return and a bunch
of other keys, but not Tab.)

I would welcome any suggestions for controlling ONLY the Tab key in a
protected form.

Thanks again.
 
S

Stefan Blom

Maybe I'm a bit slow today, but now I think I know what you mean. :)
You want tabbing to move to form fields in a specific order, but you
also want the flexibility to place the cursor in any form field (no
matter what tab order is defined in VBA). I suspect that this isn't
possible, but perhaps someone else knows better...

However, it seems that *if* it was possible to do what you want,
wouldn't that defeat the purpose of setting a tab order, since it can
be bypassed?

--
Stefan Blom
Microsoft Word MVP


in message
 
L

Lisa

It's probably my excrutiatingly long narrative that threw you (and, btw, I'm
known in my family as "the slow sister" ;-).

You're correct in summarizing what I'm trying to do -- Tab key results in a
specified sequence through the fields; Shift+Tab and mouse clicks work as
they would without a tab sequence specified.

I, too, doubt if there's a solution for this, but hope springs eternal...
Thanks again!
 

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