Form Fields in a Header/Footer?



I have created a one page incident report that has date, time, location
fields etc. at the top. It then has a large area in the center for a
narrative. At the bottom are additional fields.

If someone needs to write a large narrative, how can I set it up so that
the upper fields and lower fields stay where they are and the narrative
continues onto a second page that looks identical to the first page with
the first page's field information automatically entered on the second,
and subsequent pages?



Charles Kenyon

What follows is an outline of how I have approached this. (You don't want to
put form fields into a header footer, but rather put REF fields that reflect
the formfields' contents.) I did prepare such an incident report form for a
police department on a commercial basis about a year ago.

The simplest way is probably to put the narrative field into a table row
that is of fixed height and put a limit on the number of characters in the
field. Then have a checkbox field that the user can check to continue the
narrative. Set your page layout to have a different first page for the
headers/footers. Then copy your first page's layout of top fields into the
header for the continuation pages. Replace the formfields with REF fields
that call in the information from the first page's formfields. Copy the
first page's layout of bottom fields into the footer, replacing those
formfields as well.

Put a checkbox field below the narrative section to indicate that the
narrative is continued on the following page(s).

Then record a macro that inserts a section break (new page) at the end of
your form. You'll have to modify the macro to unprotect your document. Then
have it insert the section break deactivate the checkbox, reprotect the
document (with section 2 not being protected) and without resetting your
fields, and go to the next field on page one.

Your macro would be the on-exit macro from the checkbox. It should check the
value of the checkbox field and if it is true, should proceed, otherwise it
should move the user to the next field.

If the box is checked, the final Tab in your form will take your user to the
new page 2. The user can type as much as needed and additional pages will be

This is probably more answer than you wanted. Take a look at the MVP FAQ
page <url:>
to see code for unprotecting/protecting a form without resetting the
formfields. If you need more help with the vba code, post in the
vba.beginners newsgroup with what you have so far.

Hope this helps,

Charles Kenyon

See also the MVP FAQ: <URL:> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

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