Microsoft KB Archive/290660

= OL2002: Click Event Behavior for Standard Controls =

Article ID: 290660

Article Last Modified on 2/27/2004

-

APPLIES TO


 * Microsoft Outlook 2002 Standard Edition

-



This article was previously published under Q290660





SUMMARY
This article describes how the standard controls that are included with Microsoft Office and Outlook respond to the Click event using Visual Basic Scripting Edition (VBScript) on a custom Outlook form.



MORE INFORMATION
The Click event is the only event that Outlook supports for controls. However, for some controls the Click event may not fire if the control is bound to a field, or it may not fire at all.

For additional information about the differences between fields and controls, and how they are typically bound together, click the article number below to view the article in the Microsoft Knowledge Base:

290655 OL2002: Overview of Using Fields and Controls on Custom Forms

If a control is bound to a field, the Click event does not fire. However, either the PropertyChange or the CustomPropertyChange event typically fires because data is changing in the underlying field.

The following table summarizes whether or not the Click event will fire under various circumstances.

                                    PropertyChange or                                     CustomPropertyChange Control        Unbound   Bound   event fires when bound? -  Label            Yes       No              N/A TextBox         No        No              Yes ComboBox        Yes(1)    No              Yes ListBox         Yes(1)    No              Yes CheckBox        Yes       No              Yes OptionButton    Yes       No              Yes ToggleButton    Yes       No              Yes Frame           Yes       N/A             N/A CommandButton   Yes       N/A(2)          N/A MultiPage       No(3)     N/A             N/A TabStrip        No        N/A             No   ScrollBar        No        No              No   SpinButton       No        No              No(4) ImageControl    Yes       No              No

N/A = Not applicable

(1) These controls must have possible values set in the control in order for the Click event to fire.

(2) Commandbuttons are bound to Outlook dialogs, such as the address book dialog, Full Name dialog (contact form), and such, so the Click event is not applicable to VBScript.

(3) The Multipage1_Click event doesn't fire, but the Page1_Click event fires when the user clicks in the body of an individual page. However, this event does not typically provide useful functionality for a solution.

(4) To use a Spinbutton, you bind the Spinbutton and a Label or Textbox control to the same field. The Label or Textbox will then show the current value of the SpinButton.

