UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Extra Space In Report, Access 2016    
 
   
Nak
post Nov 14 2019, 01:00 PM
Post#1



Posts: 64
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
Go to the top of the page
 
theDBguy
post Nov 14 2019, 01:02 PM
Post#2


UA Moderator
Posts: 76,823
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
Go to the top of the page
 
GroverParkGeorge
post Nov 14 2019, 01:05 PM
Post#3


UA Admin
Posts: 36,175
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
Go to the top of the page
 
Nak
post Nov 14 2019, 01:17 PM
Post#4



Posts: 64
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)
Attached File  Design.PNG ( 7.66K )Number of downloads: 5
Attached File  Design.PNG ( 7.66K )Number of downloads: 3
 
Go to the top of the page
 
Nak
post Nov 14 2019, 01:22 PM
Post#5



Posts: 64
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
Go to the top of the page
 
theDBguy
post Nov 14 2019, 01:29 PM
Post#6


UA Moderator
Posts: 76,823
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
Go to the top of the page
 
GroverParkGeorge
post Nov 14 2019, 01:29 PM
Post#7


UA Admin
Posts: 36,175
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
Go to the top of the page
 
Nak
post Nov 14 2019, 02:08 PM
Post#8



Posts: 64
Joined: 10-January 11



Absolutely!
Go to the top of the page
 
theDBguy
post Nov 15 2019, 12:36 PM
Post#9


UA Moderator
Posts: 76,823
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
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    8th December 2019 - 01:11 PM