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
- Open your Inbox and then open a new message form.
- On the form Tools menu, click "Design Outlook Form" to enter the design mode.
- Click the (P.2) tab, and on the Form menu, click "Display This Page."
- On the Form menu, click "Control Toolbox" to display the Control Toolbox.
- Drag the ComboBox control to the P.2 page of the form.
- 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.
- In the P.2 form page, use your right-click the ComboBox and on the shortcut menu, click Properties.
- Click the Value tab and then click New, to create a new user-defined field.
- 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.
- 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.
- Right-click the TextBox control and on the shortcut menu, click Properties.
- Click the Value tab, click Choose Field, click User-defined fields in Inbox, and click the Field1 field.
- Click OK to close the Properties dialog box.
- 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