L
Lynne
I created a 12 page protected form with many tables. Each table has text form
fields and nested tables. At the top of each page, the employee name, date
and location are supposed to be entered. So, I created a table on each page
with one row that serves as the header. This “header table†has six columns
of which 3 contain form fields. The other three just contain labels. This row
is on each of the 12 pages. Once the user types in the required information
and presses the tab key, the information fills down to each of the remaining
11 pages.
To move between the form fields on each page and between pages, the user
uses the tab key. However, when the users tabs from one page to the next ,
the cursor jumps to the header field on page one then returns to the correct
field on whatever page he should be. On the same page the tab key works as it
should.
Even weirder, when I mouse-click on the header table cells on any page other
than the first, the cursor jumps to the top of the document and stays there.
How can I stop this?
I used the following code for the fill downs for the three fill-in fields, I
just changed the field name. In the form-field options, I used these as
on-exit macros.
Sub Autofill_Name1()
Dim strInput As String
strInput = ActiveDocument.FormFields("Name1").Result
ActiveDocument.FormFields("Name2").Result = strInput
ActiveDocument.FormFields("Name3").Result = strInput
ActiveDocument.FormFields("Name4").Result = strInput
ActiveDocument.FormFields("Name5").Result = strInput
ActiveDocument.FormFields("Name6").Result = strInput
ActiveDocument.FormFields("Name7").Result = strInput
ActiveDocument.FormFields("Name8").Result = strInput
ActiveDocument.FormFields("Name9").Result = strInput
ActiveDocument.FormFields("Name10").Result = strInput
ActiveDocument.FormFields("Name11").Result = strInput
ActiveDocument.FormFields("Name12").Result = strInput
End Sub
fields and nested tables. At the top of each page, the employee name, date
and location are supposed to be entered. So, I created a table on each page
with one row that serves as the header. This “header table†has six columns
of which 3 contain form fields. The other three just contain labels. This row
is on each of the 12 pages. Once the user types in the required information
and presses the tab key, the information fills down to each of the remaining
11 pages.
To move between the form fields on each page and between pages, the user
uses the tab key. However, when the users tabs from one page to the next ,
the cursor jumps to the header field on page one then returns to the correct
field on whatever page he should be. On the same page the tab key works as it
should.
Even weirder, when I mouse-click on the header table cells on any page other
than the first, the cursor jumps to the top of the document and stays there.
How can I stop this?
I used the following code for the fill downs for the three fill-in fields, I
just changed the field name. In the form-field options, I used these as
on-exit macros.
Sub Autofill_Name1()
Dim strInput As String
strInput = ActiveDocument.FormFields("Name1").Result
ActiveDocument.FormFields("Name2").Result = strInput
ActiveDocument.FormFields("Name3").Result = strInput
ActiveDocument.FormFields("Name4").Result = strInput
ActiveDocument.FormFields("Name5").Result = strInput
ActiveDocument.FormFields("Name6").Result = strInput
ActiveDocument.FormFields("Name7").Result = strInput
ActiveDocument.FormFields("Name8").Result = strInput
ActiveDocument.FormFields("Name9").Result = strInput
ActiveDocument.FormFields("Name10").Result = strInput
ActiveDocument.FormFields("Name11").Result = strInput
ActiveDocument.FormFields("Name12").Result = strInput
End Sub