Skip navigation

Customizing Printing of Check Box Fields in a Custom Form

I've created a custom appointment form for my boss, but she doesn't like the way it prints because fields that use a check box (e.g., Needs Tables) print out with the value -1 or 0 instead of Yes or No. How can I keep the convenience of the check box, but get the form to print Yes or No?

You're getting -1 or 0 because they're the numeric values that correspond to the Boolean values True and False. You can change the printout without altering the form's onscreen layout by taking advantage of the Include this field for Printing and Save As setting on the Validation tab of the check box's Properties dialog box, which Figure 1 shows. Before you make any changes, back up your existing form by saving it as an .oft file. Then clear the check box, and click OK.

At this point, your form won't print out the value of the Needs Tables field at all. You need to add a new field to the form that applies only to the printout. In the form's Field Chooser, click New and create a new field called Needs Tables 2 (or whatever name you choose). Choose Formula for the field's type, and enter the formula

IIf(\[Needs Tables\], "Yes", "No") 

This formula tells Outlook to use the literal string Yes when the value of the Needs Tables field is True and to use No otherwise.

Then, drag the Needs Tables 2 field from the Field Chooser to a blank custom page on your form to ensure that the field definition is stored with the form and not just in the calendar folder.

To test the formula, select Form, Run This Form, and in the window that displays the new item created from your form, select the check box for the original Needs Tables field. On the custom page to which you added Needs Tables 2, you should see a value of Yes instead of No. Then print the form. The printout should omit the original Needs Tables field and show the value of the Needs Tables 2 field instead.

Repeat this process to add any other fields whose printout value you want to alter. When you've finished testing the form, use the Form, Display This Page command in design mode to hide the page with the formula fields on it, then increment the version number on the Properties page of the Needs Tables 2 field. Use the Tools, Forms, Publish Form command to publish the form again in the same location and with the same name as the original form.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish