W
Weste
I have a Word 2002 form. I have used the controls from the Visual Basic
toolbox vs form fields becuase I needed more robust controls, eg multi-column
combo boxes. The controls are within a table in the Word document. In the
KeyDown event for each control I have placed the code to allow users to tab
thru the controls. See example below.
If KeyCode = vbKeyTab Then
me.txtRequestorExt.Select
End If
This code works fine as long as the form is not protected. However, once I
protect the form, pressing tab no longer selects the correct control.
I have also tried unprotecting the doc before selecting the code and then
protecting the doc again after the selection is made.
If KeyCode = vbKeyTab Then
Me.Unprotect
Me.txtRequestorExt.Select
Me.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End If
Using this method the cursor moves to the correct control until the
protection is turned back on. The cursor then jumps to the next control.
Is there anything I can do to have protection turned on and tab thru my
controls? Thanks for your help.
Weste
toolbox vs form fields becuase I needed more robust controls, eg multi-column
combo boxes. The controls are within a table in the Word document. In the
KeyDown event for each control I have placed the code to allow users to tab
thru the controls. See example below.
If KeyCode = vbKeyTab Then
me.txtRequestorExt.Select
End If
This code works fine as long as the form is not protected. However, once I
protect the form, pressing tab no longer selects the correct control.
I have also tried unprotecting the doc before selecting the code and then
protecting the doc again after the selection is made.
If KeyCode = vbKeyTab Then
Me.Unprotect
Me.txtRequestorExt.Select
Me.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End If
Using this method the cursor moves to the correct control until the
protection is turned back on. The cursor then jumps to the next control.
Is there anything I can do to have protection turned on and tab thru my
controls? Thanks for your help.
Weste