Creating a Data-Entry Form

Word contains extensive tools for building forms that you can use in a number of ways:

  • You can create a form that's designed to be printed and subsequently filled out with a pen or a typewriter. Typically, you'll create and maintain such a form as a standard Word document.

  • You can make a form that's designed to be filled out online (by using either Word or a Web browser). The user fills in the missing information—say, customer name and line items for an invoice, or payment instructions for a statement—and then prints the form. These kinds of forms are almost invariably set up as templates, with portions of the form (say, the return address) "locked" so the user can't alter them. When the form is filled out (as in Figure 19.6), it can be printed, saved, or handled like any other document.

    Figure 19.6. A custom invoice form created and saved as a template can be filled out and mailed to a customer.

Tip from

Although Word can certainly perform most of the functions required of these online forms, if the people filling out the forms will be using Word, you should consider using custom dialog boxes in VBA/Word for this type of work. VBA/Word has a great deal of power not available directly in Word forms, and has the added benefit of a full development and testing environment, which Word forms can't begin to match.


  • You might post a more sophisticated online form on your company's Web site, so a potential customer could fill in her name and address, and request a catalog. The information would be sent by e-mail to someone inside your company. These forms exist as Word HTML documents, and must include a Submit or Image Submit button, so the form results can be transmitted by e-mail.

  • At the highest end of the chain, you can create Word forms that interact directly with a database so, for example, a customer participating in your company's extranet can enter orders directly, and have your internal order database updated without any further human intervention.

The tools you use to create all four types of forms reside on the Forms toolbar and, perhaps, the Control Toolbox toolbar.

To create one of the more complex data-entry forms, which is designed to be filled out online by Word users, follow these steps:

  1. To create a new template, choose File, New; click the General Templates item in the New from Template list in the New Document task pane; choose Template in the Create New box at the lower right of the Templates dialog box; and click OK.

  2. Put together the form's static elements—the parts that won't change each time the form is used. This might include a logo, return address, tables, questions, and descriptions.

  3. Use the Forms toolbar or the Control Toolbox toolbar to place form fields on the form.

  4. When you're done, click the Protect Form button on the Forms toolbar. That will keep users from altering any static information in the form: They'll be limited to making changes in the form fields you have specified.

If you then save the template in some readily accessible location, users can create a new document based on the template, fill out the template, print it, and save it, much as they would any other document.

Tip from

If you need to make changes to the template, you'll have to click the Protect Form button again before Word will allow you to change any static portions.


Data-entry form design techniques, and the characteristics of many individual controls on the Forms toolbar, are covered in detail in this book's discussion of Excel data-entry forms.

→ For details from an Excel point of view, see "Using Forms to Add and Edit List Data".

Form controls available on the Control Toolbox toolbar—check boxes and option buttons, drop-down lists, list boxes, text boxes, and the like—are standard HTML form controls. As such, they have properties and generate events that can be controlled in VBScript and JScript applications. These properties and events are detailed in the online Help under the topic "Form controls you can use on a Web page."

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.132.97