Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

September 25, 2006 12:00 AM

Customizing Printing of Check Box Fields in a Custom Form

Windows IT Pro
InstantDoc ID #93198
Rating: (0)

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.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.