Screen.PreviousControl Property
Access Developer Reference |
You can use the PreviousControl property with the Screen object to return a reference to the control that last received the focus. Read-only.
Syntax
expression.PreviousControl
expression A variable that represents a Screen object.
Remarks
The PreviousControl property contains a reference to the control that last had the focus. Once you establish a reference to the control, you can access all the properties and methods of the control.
You can't use the PreviousControl property until more than one control on any form has received the focus after a form is opened. Microsoft Access generates an error if you attempt to use this property when only one control on a form has received the focus.
Example
The following example displays a message if the control that last received the focus wasn't the txtFinalEntry
text box.
Visual Basic for Applications |
---|
|