Solved

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

Posted on 2013-11-16
2
440 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 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

738 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