Focus stay on datasheet

  • Thread starter Thread starter andifebr
  • Start date Start date
A

andifebr

Hi All,
I created one main form with a subform (datasheet view).
and I wonder if someone can tell me how to to make the datasheet
selected rows (lets say the first 5 rows) keep focus when we move to
another control for example a button on the main form.
any help would be very much appreciated.

TIA
Andi
 
You cannot keep them selected when you move off the subform, but you can use
the SelTop and SelHeight properties to refer to them on the subform:

Me.NameOfSubform.Form.SelTop = 1
Me.NameOfSubform.Form.SelHeight = 5

That should select the first 5 rows in the first column. Use the SelWidth
property to select the number of columns.
 
Back
Top