Custom forms are dialog boxes that display Microsoft Project fields for data entry. Don't confuse custom forms with built-in form views such as the Task Entry view. Form views are built in to Microsoft Project and show a set of predetermined fields. On the other hand, custom forms are like dialog boxes that you create. You specify the fields of information you want on the form, where they are to be placed, and how they are accessed.
To use a custom form, you first select the tasks or resources you want to edit with the form. Then you open the form and enter values into the fields. When you click OK on the form, the changes are applied to the selected tasks or resources, and the form disappears.
Tip | Enter field values using a table If you want to enter field values without having to open and close a custom form, you can add the fields you want to a table. You can then edit the values in the sheet portion of a view. |
You can create a new custom form or copy an existing form and then edit it. You can add fields, text, and buttons to the form. You can also add group boxes to separate items within the form.
Follow these steps to create a new form:
Click Tools, Customize, Forms.
The Customize Forms dialog box appears (see Figure 26-7).
Figure 26-7: Use the Customize Forms dialog box to work with an existing form or create a new one.
To create a new custom form, click New.
To use an existing form as a template, click the form in the list and then click Copy.
In the Define Custom Form dialog box, type a new name for the form. If you want to open the form with a keyboard shortcut, type the letter in the Key box.
Caution | Microsoft applications use many letters of the alphabet for other commands, such as C for Copy, X for Cut, and P for Paste. If you select one of these reserved characters for a shortcut key, a warning appears that instructs you to select another letter. |
When you click OK, the Custom Form Editor opens (see Figure 26-8).
Figure 26-8: You can specify the size and position of the dialog box for a custom form as well as its contents.
To change the size of the form, drag a corner or one of its edges until the form is the size you want.
To change where the form appears when it loads, drag the title bar of the new form to the location onscreen you prefer.
If you want to specify an exact size and location for the form, double-click the form. In the Form Information dialog box, enter values in the X and Y boxes to specify the form's location. Enter values in the width and height boxes to specify the form's size (see Figure 26-9).
Figure 26-9: Specify the precise location and size of your form in the Form Information dialog box.
Tip | Specify the size of your form The values in the X and Y boxes represent pixels on your screen. If your screen resolution is 1280 by 1024, a form with a width of 640 and height of 512 would take up half the screen. |
Custom forms display fields that contain information about the selected tasks or resources. By default, you can view or edit any of the fields in a form. However, you can restrict a field so that it can't be edited.
To add a field to a form, follow these steps:
In the Microsoft Project Custom Form Editor window, click Item, Fields.
The Item Information dialog box appears (see Figure 26-10).
Figure 26-10: You can specify the size, position, and field name as well as whether users can edit the field value.
To specify the location of the field, enter values in the X and Y boxes.
To specify the size of the field box, enter values in the Width and Height boxes.
Tip | Resize a field box by dragging After a field box is added to your form, you can easily resize it by dragging one of its edges or corners. You can also move the field box by dragging the center of the box to the new location. |
In the Field box, click the field that you want to appear in the box.
Click the down arrow and then type the first character or two to move quickly to the field you want.
To prevent users from editing the field, select the Show As Static Text check box. A value appears in the field, but users can't edit those values.
Click OK.
The field box appears in the form as specified. Make any adjustments you want to the size and position of the field box.
Repeat this procedure for all field boxes you want to add to your custom form.
You can add text to label the fields or convey other information to the user . To add text to a form, do the following:
In the Custom Form Editor window, click Item, Text.
A new blank text box appears within the form you are editing.
Double-click the text box to display the Item Information dialog box.
Type the text you want to appear on the form in the Text box and then click OK.
The text appears in the form (see Figure 26-11). If necessary, drag the text to the position you want.
Figure 26-11: Start to create a new form with field boxes and text boxes.
Follow these steps to modify text:
To change the size of the text box, drag one of its edges or corners.
To reposition the text box in the form, drag the center of the text box to the location you want.
To change the text itself, double-click the text box.
A new form includes OK and Cancel buttons by default. However, if you removed one of these buttons earlier and want to replace it, you can add buttons to the form. To do this, follow these steps:
In the Custom Form Editor window, click Item, Button.
The New Button dialog box appears.
Select the option for the button that you want to add to the form.
You can add only an OK or Cancel button.
Click OK in the New Button dialog box to add the button to the form.
Drag the button where you want it to appear in the form.
Tip | Forms can't contain more than one OK or Cancel button A form includes an OK and Cancel button by default. You can't add another OK or Cancel button to the form. The only time you can exercise the Item, Button command is after you delete one of those buttons. |
If a form contains a lot of fields, you can make the form more readable by grouping related fields. You can add a group box to the form and then move the items you want to group into it.
To add a group box to a form, do the following:
In the Custom Form Editor window, click Item, Group Box.
The group box appears in the custom form.
Drag the group box to the location you want in the form.
To resize the group box, drag one of its edges or corners.
To change the text that appears at the top of the group box, double-click the group box. The Item Information dialog box appears. Type the new label in the Text box.
Move any other items you want into the group box.
Cross-References | For information about creating forms using Visual Basic for Applications, see "Creating UserForms". |
To save your new form, click File, Save. You cannot name the form from the Custom Form Editor, but you can do so in Microsoft Project in the Customize Forms dialog box. To return to Microsoft Project, click File, Exit.
Follow these steps to edit an existing form in Microsoft Project:
Click Tools, Customize, Forms.
The Customize Forms dialog box appears.
Click the name of the form you want to edit and then click Edit.
Make the changes you want in the Custom Form Editor window, as described in the section "Creating Forms" earlier in this chapter.
When finished, click File, Save.
Click File, Exit to close the Custom Form Editor window and return to Microsoft Project and the Customize Forms dialog box.
Do the following to rename an existing form:
Click Tools, Customize, Forms.
The Customize Forms dialog box appears.
Click the name of the form you want to rename and then click Rename.
Type the new name in the Define Custom Form dialog box.
You can use the Customize Forms dialog box when you want to use one of your forms. However, if you plan to use a custom form frequently, you can add a button to a toolbar or assign a shortcut key to open it.
To open a custom form from the Microsoft Project menus , follow these steps:
Select the tasks or resources you want to edit.
Click Tools, Customize, Forms. The Customize Forms dialog box appears.
Click the name of the form you want to display and then click Apply (see Figure 26-12).
Figure 26-12: Select the task or resource form you want to edit, and then click Apply to display the form.
To add a form as a toolbar button, follow these steps:
Click Tools, Customize, Toolbars .
The Customize dialog box appears.
Click the Commands tab. Click the All Forms category.
Drag the form you want to add from the command list to the toolbar.
Cross-References | For more information about adding buttons to toolbars, see "Adding and Removing Buttons on a Toolbar" earlier in this chapter. For information on defining a keyboard shortcut for a form, see "Creating and Customizing Forms" earlier in this chapter. |