Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


September 25, 2006

Customizing Printing of Check Box Fields in a Custom Form

RSS
Subscribe to Windows IT Pro | See More Printing Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
Main Article    Outlook Tips & Techniques, November 2006

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.

End of Article



Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Microsoft, News Corp. Discuss Locking Out Google

Microsoft and Rupert Murdoch's News Corp. recently discussed an alliance that would counter Google's fledgling online news service. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...


Exchange Server and Outlook Whitepapers Email Controls and Regulatory Compliance

Take Control of Your Email: Understand the Business Reasons for Email Storage Management

Related Events Managing IT Across Multiple Locations

Bail Out Your Exchange Environment

Check out our list of Free Email Newsletters!

Exchange Server and Outlook eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

The Expert's Guide for Exchange 2003: Preparing for, Moving to, and Supporting Exchange Server 2003

Related Exchange Server and Outlook Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format

Exchange & Outlook UPDATE eNewsletter
News, strategies, products, and developments in Exchange Server and Outlook messaging.

Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement