G.14. The Screen Object

The Screen object refers to whatever form, report, or control currently has the focus within the application. You can use the Screen object and its properties to manipulate the active window no matter which form, report, or control is currently displayed.

The properties of the Screen object are listed in the following table.

PropertyData TypeDescription
ActiveControlControl objectSpecifies the control that has the focus.
ActiveDatasheetForm objectSpecifies the datasheet that has the focus.
ActiveFormForm objectSpecifies the form that has the focus.
ActiveReportReport objectSpecifies the report that has the focus.
ApplicationApplication objectReferences the current Access application.
MousePointerIntegerSpecifies the type of mouse pointer currently displayed.
ParentObjectParent of the object that currently has the focus.
PreviousControlControl objectSpecifies the control that previously had the focus.

Get Access™ 2007 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.