Solved

ms access database container dual monitor setup

Posted on 2013-11-28
7
979 Views
Last Modified: 2013-11-29
I have a ms access application on a dual monitor setup,the user has the option of  selecting which monitor the forms will be displayed on this is done by the use of a command button,I am looking for a way to switch the database container using vba to the selected monitor or any alternative method? thanks
0
Comment
Question by:Svgmassive
  • 3
  • 2
  • 2
7 Comments
 
LVL 21
ID: 39683886
Curious, What version of Access and Windows?

I have a lot of user with two or more monitors.  I attempted something similar once.

Since all the multiple monitor system are running Windows 7 I train the user to use the Windows 7 Snap feature. By using the Windows Key and the arrow keys together they can easily move applications around between monitors.  In the long run the users can now get a lot more out of their dual monitors when when not using my Access application. They are a more empowered user. This allowed each users to move windows around on the monitors at will to best fit their current needs.

Boyd Trimmell, Microsoft Access MVP
0
 

Author Comment

by:Svgmassive
ID: 39683899
access 2010 windows 7 64bit. Thanks hitech.I would like to once the users click the command button to switch monitors the container will also switch to the selected monitor
0
 
LVL 26

Accepted Solution

by:
Nick67 earned 500 total points
ID: 39684054
It can be done, but it REALLY won't be simple, especially if not all monitor setups are the same, or if you have really huge monitors.  Positioning is done by twips from the upper left corner being (0,0) to the lower right hand corner being some number dependent on the monitor sizes and numbers involved.

The gotcha is that the values you can use have an upper bound of 32K.  Three 24" 1080p monitors are large enough that they breach that boundary.  And that's all relative to the main Access window, so it gets less applicable once you leave Access 2003 and get stuck with tabs.

To move the main Access window is probably going to take Windows API code.  You'd need to find the handle of the Access app, and then move the window to a desired location.  The beginnings of wisdom are here
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545(v=vs.85).aspx
and better here:
http://support.microsoft.com/kb/210085

The code in the KB article will go nicely in an Access module--but working out all the X and Y values that will correspond to where you want the window to go on all the computers with all the varying monitors setups...

Well, that won't be fun.
It's almost like that old saw about teaching a man to fish.  In this case, teach some end users to position their own windows, and they'll be able to do it for themselves and others forever.  Try to code it up for them, and you've given yourself a long lasting headache.

And lets not talk about what pop-up and modal windows do :(
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 21
ID: 39684131
Diito what Nick67 said.

I would like to once the users click the command button to switch monitors the container will also switch to the selected monitor

I also thought that sounded like a great idea. A few gray hairs later and users think I am an idiot because I cant get it to work correctly all the time. It was starting to frustrate a lot of users since it was messing up how they like to layout their forms/apps.  It sounded like a good idea to me. Once I started watching how the users work and testing with all the different hardware and video configurations  I quickly realized that teaching them Windows 7 Snap was much more powerful that anything  I code code.  I did waste  many hours on this trying to get it to handle everything the users wanted. After teaching then Windows & Snap everybody is happier and more productive.  Making the users more productive was the original reason I started this journey.

Curious, is the something 60% or more of your users ask for or is this just to see if you can?
0
 

Author Closing Comment

by:Svgmassive
ID: 39684295
excellent
0
 
LVL 26

Expert Comment

by:Nick67
ID: 39685846
0
 
LVL 21
ID: 39686145
Svgmassive,

Would you mind updating us on how it goes?

Good luck with your project.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now