Specify screen location of form

  • Thread starter Thread starter Julie
  • Start date Start date
J

Julie

I have an already open form and want a small pop-up form
to be located relative to my cursor position in the open
form.

I know where I want it to be, but would like to have the
VBA code in the same module as where I open the pop-up
form - as opposed to doing a MoveSize command on the on-
open event of the pop-up form, because theres no simple
way of passing the coordinates to the pop-up form.

So how do I specify the position of the form when I open
it?
 
See:
http://www.lebans.com/openform.htm
A97OpenFormRelativeToControl.zip is an MDB showing how to open a second
Form relative to a control on the parent Form.

Version 1.5

Onno Willems added logic to support controls on TAB pages. Fixed logic
Bug for LEFT setting..



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