• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

center a report on application window

I would like to center a ms access report on the application screen using vba.Thanks
0
Svgmassive
Asked:
Svgmassive
  • 4
  • 2
  • 2
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Just set the Auto Center property to True. Open the report in Design view, open the Property Sheet, and select the Format tab. You'll see Auto Center in the listing - set that to True.
0
 
SvgmassiveAuthor Commented:
VBA
0
 
SvgmassiveAuthor Commented:
I can do that but that's not what i am looking for
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You can use DoCmd.MoveSize to manipulate the position of an object in Access:

DoCmd.MoveSize 2880, 2880

This would move the object to approximately 2 inches below the top, and 2 inches to the right of the screen edge. The values above are in Twips, and 1440 Twips = 1 inch (approximately).

As to "center" - you'd have to further define that. Do you mean the center of the Screen, the center of the Access application, center of another object ... etc etc

Here's a link to a module on the MVPS website that goes into a little more depth: http://access.mvps.org/access/forms/frm0042.htm
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
Could you be wanting to change the Zoom level?

Example:

DoCmd.OpenReport "rptYourReport", acViewPreview
DoCmd.RunCommand acCmdZoom100 

Open in new window



or maybe this method:

In the report's On Open event try using this code:

DoCmd.Maximize
DoCmd.RunCommand acCmdZoom100

Open in new window


You may also need to include in the report's CLOSE event to use this:
 
DoCmd.Restore

Open in new window

0
 
SvgmassiveAuthor Commented:
still have not been able to have this issue addressed.
0
 
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
I think there is some confusion as to what you want. I know am am not sure what you really want.

Between LSMConsulting's suggestions and mine, we have covered the common solutions when people ask about "centering" a report.

In Access 2007 or later, there is  Print Preview mode and Report View mode. You may be wanting Print Preview mode.

I am confident we can provide a solution once we understand exactly what you want. Can you example in more detail exactly what you are needing?

Also it would hep to know:
What version of Access?
Are you display the report in Print Preview mode  or Report View mode (2007 or later)?
0
 
SvgmassiveAuthor Commented:
I am using access 2010,Here's the problem,I am using the custom function PreviewAndZoomReport i would like to set my own zoom value when i specify a value the report opens to the left of the screen even with the autocenter set to yes,I would like to use vba to center the report on the screen.thanks
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now