Determine datasheet cell Top and Left attributes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a datasheet form based on a non-updateable query. I need to determine
the Left and Top location of a control (cell) that has focus. To update the
cell, I will display a single text box form without borders exactly over the
cell the user wants to change. However, i don't know how to determine the
exact location of the cell relative to the form. Any suggestions?
 
SelTop and SelLeft are the exposed props you are looking for. Here is a
solution for forms in Single view that you may be able to easily modify
to work with forms in Datasheet view.
http://www.lebans.com/openform.htm
OpenFormRelativeToControl.zip is an MDB showing how to open a second
Form relative to a control on the parent Form.



Version 1.4

Added logic to handle form's with their Popup property set to True.
Added support for the following positions relative to the specified
control.

' 0 = Underneath
' 1 = On Top
' 2 = Right Side
' 3 = Left Side
' 4 = Bottom Right Hand Corner

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top