PC Review


Reply
Thread Tools Rate Thread

Control location on screen where form opens?

 
 
plh
Guest
Posts: n/a
 
      29th Sep 2011
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.
Thanx,
-plh
 
Reply With Quote
 
 
 
 
David-W-Fenton
Guest
Posts: n/a
 
      30th Sep 2011
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/
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Location on Screen BillCPA Microsoft Excel Programming 1 17th Nov 2008 11:11 PM
Word 2003 opens maximised window in wrong location on screen dawsy Microsoft Word Document Management 0 12th Dec 2006 11:02 AM
simple question: how to get the control location of screen =?Utf-8?B?U3RldmVuLlh1?= Microsoft Dot NET Framework Forms 1 11th Mar 2006 02:15 AM
How do I control where the window opens up on my screen when I cl. =?Utf-8?B?Unlhbg==?= Microsoft Outlook Discussion 0 10th Feb 2005 05:51 PM
How do I control where the window opens up on my screen when I cl. =?Utf-8?B?Unlhbg==?= Microsoft Outlook Discussion 0 10th Feb 2005 05:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:22 PM.