Microsoft KB Archive/114553

= ACC: Using the Change Event to Display the Current Value =

Article ID: 114553

Article Last Modified on 1/18/2007

-

APPLIES TO


 * Microsoft Access 2.0 Standard Edition
 * Microsoft Access 95 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q114553



Moderate: Requires basic macro, coding, and interoperability skills.



SUMMARY
To refer to a control's current value during a Change event, use the control's Text property.



MORE INFORMATION
You can use a control's Text property to refer to the control's current value during a Change event. For example, to display the current value of a field called txtExample in the title bar while you are typing in a text box bound to that field, create the following Change event procedure for the text box:

Sub txtExample_Change Me.Caption = Me!txtExample.Text End Sub

NOTE: You must use the Text property to refer to the text in the field before it is committed. In the above example, if Me!txtExample is used instead of Me!txtExample.Text, the committed value will be displayed in the title bar instead of the current value.

