plh <(E-Mail Removed)> wrote in
news:d1372807-91dd-4efb-a161-(E-Mail Removed)
:
> Access 2010:
> In my application there is a spot where users use a command button
> to open two forms at the same time. They open on top of each other
> as expected. It would be nice if I could open them side by side.
> Is there a way to do that, control where on the screen they open?
> I seem to remember seeing something about it, but I searched in
> this group using various search strings but turned up nothing.
There are two ways:
1. turn off autopositioning and position the forms onscreen and hit
Ctrl-S on the keyboard.
2. in the form's OnOpen event, use the DoCmd.MoveSize command (it
will operate on the currently active object, so could be somewhat
unreliable if there's something weird during the OnOpen events of
your forms).
3. use Windows APIs to position the windows:
http://access.mvps.org/access/forms/frm0042.htm
The latter is by far the most reliable in terms of end results, but
can give unpredictable results if you're trying to size the form
(which you're not, so not a concern). The issue there is that
different Windows chrome causes the sizes of Windows to be
different.
--
David W. Fenton
http://www.dfenton.com/
contact via website only
http://www.dfenton.com/DFA/