ramrom
asked on
Position popup relative to a command button.
I want to position a popup to the right of a subform.
I presume to use movesize, but that requires coordinates relative to the screen.
I activate the popup from a command button on the subform.
How do I get the top and left coordinates of the subform relative to the screen so I can use movesize?
I presume to use movesize, but that requires coordinates relative to the screen.
I activate the popup from a command button on the subform.
How do I get the top and left coordinates of the subform relative to the screen so I can use movesize?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Oh Oh I just discovered that the above works fine if I feed GetFormDimensions() the main form, but I'm dealing with positioning the popup relative to a subform (actually a subform on a subform). I have not found a way to pass the subform to GetFormDimensions(). So I am back to square 1.
ASKER
Well ignore that. I found the right way to refer to the subform. It works.
ASKER
Rather than messing with openargs and string parsing, I gave my form a move subroutine which takes the coordinates, sets focus to self and does the movesize.
I then docmd.openform and follow that with a call to the move sub.