Fred Hooper
fahooper at trapo.com
Thu Aug 24 19:35:20 CDT 2006
Hi Bill, I've fiddled a bit with the code at http://support.microsoft.com/default.aspx?kbid=210141 (which uses MoveSize) that is designed for sizing forms and I was able to make it work for the reports just by changing the input specification from Form to Report (and be dual-purpose by using Object). However, my problem with this approach is that I haven't found an equivalent to the On Unload event for reports to save the size that user adjusts to. I haven't experimented yet with the events; perhaps the On Deactivate event will work. If not, I'll either maximize it or follow your approach. Fred -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bill Patten Sent: Thursday, August 24, 2006 6:47 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Control size of Report Preview window Fred I have been fighting the same problem, I don't want the form to maximize but want it to open large enough so that the user can read it without having to adjust the size. This is working much better than stock. I haven't finished testing it so no comments from my client as yet but it might help you solve your problem. use docmd.movesize Dim stDocName As String stDocName = "rptRequisitionStatus" DoCmd.OpenReport stDocName, acPreview DoCmd.RunCommand acCmdZoom75 DoCmd.MoveSize , , 11800 Play with the 1180 and be sure to check it on different resolution screens. HTH Bill ----- Original Message ----- From: "Fred Hooper" <fahooper at trapo.com> To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Sent: Thursday, August 24, 2006 2:39 PM Subject: [AccessD] Control size of Report Preview window Is there any way to control the size of the report preview window? Runcommand acCmdZoom (10 ... 200) controls the size of the printing in the window but doesn't control the size of the window. Manually sizing the window and pressing the save button "kind of" works, but the window gets progressively smaller as the front end is repeatedly compacted and repaired. Also, when it's moved to a machine with a lower resolution monitor it further shrinks. Is there something using twips (like there is for forms) that I can read, save & apply so the report preview window will be the same inch/cm dimensions on all monitors, regardless of their resolution? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com