I have hijacked the "Query Design Datasheet Cell" right-click context pop-up menu to provide database-specific actions. From there I use the SelTop and SelHeight properties to determine context and take action from there.
This works about half the time, the other half it appears that it is not the Screen.ActiveDatasheet that has focus, but instead the Screen.ActiveControl and therefore the critical SelTop and SelHeight properties are not available. I cannot determine when this will happen as the exact same actions will have different results.
Is there anyway to make the datasheet active or to navigate from the ActiveControl to the ActiveDatasheet or other way to determine the currently selected rows?