My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#1 | |
Posts: 65 Joined: 10-January 11 ![]() | Hi I am building a report using Access VBA. It works pretty well... When I open the report I receive a message "Report Width is greater than page width". In the preview, the extra space is invisible: fine! In the design, there is effectively an extra space with nothing in it, which I can remove manually or using the Access visual help (the green triangle and the exclamation sign with a yellow background. Is there a way to remove this extra space with VBA? Thanks Nak |
![]() Post#2 | |
![]() UA Moderator Posts: 76,910 Joined: 19-June 07 From: SunnySandyEggo ![]() | Hi. I'm not sure I understand where this extra space is located. Can you post a screenshot to help us understand better? Thanks. -------------------- Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas Access Website | Access Blog | Email |
![]() Post#3 | |
![]() UA Admin Posts: 36,209 Joined: 20-June 02 From: Newcastle, WA ![]() | I'm not really sure I follow. Why would you not remove the extra space and save the report that way? Why would it be necessary to do it in VBA? -------------------- My Real Name Is George. Grover Park Consulting is where I did business for 20 years. How to Ask a Good Question Beginning SQL Server |
![]() Post#4 | |
Posts: 65 Joined: 10-January 11 ![]() | The attached is a screen shot of the report in the design stage. All measures are in inches. Thanks Attached File(s) |
![]() Post#5 | |
Posts: 65 Joined: 10-January 11 ![]() | I am using a template report and allows user to use it to generate multiple reports on-the-fly using an application report generator (ARG). This ARG will cater for selecting fields, sorting, filtering, … It's up to the ARG to take care of all the various potential on-the-fly reports. Hence the VBA Thanks |
![]() Post#6 | |
![]() UA Moderator Posts: 76,910 Joined: 19-June 07 From: SunnySandyEggo ![]() | Hi nak. Thanks for posting the images. However, you didn't mark where the "extra space" was. Am I correct in thinking you're referring to the empty area of the detail section to the right of the textboxes? -------------------- Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas Access Website | Access Blog | Email |
![]() Post#7 | |
![]() UA Admin Posts: 36,209 Joined: 20-June 02 From: Newcastle, WA ![]() | I see. So users create new reports regularly as part of their job? Do they save them for re-use? This line of code might accomplish what you want. I can't tell you where to put it in your module that creates the new reports, but something like this might work. NewReportBeingCreated.Width = 1440 Although you don't want it to be 1440 twips (or 1 inch), Access will only set the width to the narrowest space that will accommodate existing controls. Or, if you prefer, maybe you could set it to 8.5 x 1440, i.e. 8.5 inches wide, which is the standard page size. If you are working in Centimeters, of course, you'll adjust to the appropriate page size. This post has been edited by GroverParkGeorge: Nov 14 2019, 01:31 PM -------------------- My Real Name Is George. Grover Park Consulting is where I did business for 20 years. How to Ask a Good Question Beginning SQL Server |
![]() Post#8 | |
Posts: 65 Joined: 10-January 11 ![]() | Absolutely! |
![]() Post#9 | |
![]() UA Moderator Posts: 76,910 Joined: 19-June 07 From: SunnySandyEggo ![]() | Okay. Good luck! -------------------- Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas Access Website | Access Blog | Email |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 15th December 2019 - 03:28 PM |