[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

make a report to open to the right of...

Posted on 2013-11-16
2
Medium Priority
?
447 Views
Last Modified: 2013-11-17
In a two screens setting; the form opens in the large screen. But. upon dbl-click on a label on a the form an expected report opens in the smaller screen not on the top of the form where I am trying to get it opened.

FYI, the report is only 2 inches wide and opens in  dialog mode. This report is best to open 3 inches from the left edge of the form in the large screen as well.

Question: How can I change the following code (possibly passing the left position of the report as OpenArgs)?

DoCmd.OpenReport "report1", acViewReport,,, asDialog

Or, do something in the open/ load event of the report to sense the left-position of the form to position itself 3 inches to right of it.

All works fine except that the report opens up in the laptop monitor (smaller screen) not in the large screen.

Thank you.
0
Comment
Question by:Mike Eghtebas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 39654433
You can use DoCmd.MoveSize to position an object:

DoCmd.MoveSize 250, 300

This would position the object at 250 (inches, centimeters, etc) to the right of the Access window, and 300 in/cm down from the top of the Access window. If you want to position it beside another object, you'd have to get that object's position first, and use that. For example, if I wanted to put it beside a form named "fUser", I'd do this:

Dim iRight As Integer
Dim iDown as Integer

iRight = Forms("fUser").WindowLeft + Forms("fUser").Width
iDown = Forms("fUser").WindowTop

DoCmd.MoveSize iRight, iDown

You would do this in the Load or Open event of your report.

See this Help topic:
http://msdn.microsoft.com/en-us/library/office/aa210274(v=office.11).aspx
0
 
LVL 34

Author Closing Comment

by:Mike Eghtebas
ID: 39655095
Thank you very much. I wonder if you have the time to take a look at:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_28296603.html

Mike
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

656 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