You can use the ActiveDatasheet property together with the Screen object to identify or refer to the datasheet that has the focus. Read-only Form object.
expression.ActiveDatasheet
expression Required. An expression that returns one of the objects in the Applies To list.
The ActiveDatasheet property setting contains the datasheet object that has the focus at run time.
This property is available by using a macro or Visual Basic and is read-only in all views.
You can use this property to refer to an active datasheet together with one of its properties or methods. For example, the following code uses the ActiveDatasheet property to reference the top row of the selection in the active datasheet.
TopRow = Screen.ActiveDatasheet.SelTop