Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/167187

From BetaArchive Wiki

Article ID: 167187

Article Last Modified on 1/19/2007



APPLIES TO

  • Microsoft Outlook 97 Standard Edition



This article was previously published under Q167187

SUMMARY

This article demonstrates how you can bind two controls to the same field by using the Microsoft Outlook 97 form design feature.

MORE INFORMATION

This example uses two form controls, a ComboBox and a TextBox. When you click to make a selection from the ComboBox list, the TextBox automatically displays the selected choice. The TextBox is bound to a field (Field2), whose value is automatically calculated from the value of the ComboBox field (Field1).

Creating the Form And the Controls

  1. Open your Inbox and then open a new message form.
  2. On the form Tools menu, click "Design Outlook Form" to enter the design mode.
  3. Click the (P.2) tab, and on the Form menu, click "Display This Page."
  4. On the Form menu, click "Control Toolbox" to display the Control Toolbox.
  5. Drag the ComboBox control to the P.2 page of the form.
  6. Drag the TextBox control to the P.2 page of the form.

Binding the ComboBox Control to a Field

The following steps bind a field, called Field1, to the ComboBox control. This field has the possible values of Red, Green, and Blue.

  1. In the P.2 form page, use your right-click the ComboBox and on the shortcut menu, click Properties.
  2. Click the Value tab and then click New, to create a new user-defined field.
  3. In the Name box, type Field1 and then click OK to return to the Properties dialog box. Field1 is an arbitrary user-defined field name.
  4. In the "Possible values" box, type Red;Blue;Green and click OK.

Binding the TextBox Control to the Same Field

The following steps also bind the TextBox control to the Field1 field.

  1. Right-click the TextBox control and on the shortcut menu, click Properties.
  2. Click the Value tab, click Choose Field, click User-defined fields in Inbox, and click the Field1 field.
  3. Click OK to close the Properties dialog box.
  4. On the Tools menu, click "Design Outlook Form" to exit the design mode.

When you click to select Red, Blue, or Green from the ComboBox, your selection automatically populates the TextBox.

REFERENCES

For more information about using fields and controls with Microsoft Outlook 97, please see the following article in the Microsoft Knowledge Base:

168975 OL97: How to Use Fields and Controls with VBScript


For more information about creating solutions with Microsoft Outlook 97, please see the following articles in the Microsoft Knowledge Base:

166368 OL97: How to Get Help Programming with Outlook


170783 OL97: Q&A: Questions about Customizing or Programming Outlook



Additional query words: OutSol

Keywords: kbhowto kbprogramming KB167187