chennaiprogrammer
Programmer
- Jul 31, 1999
- 54
MS ACCESS :
Problem in controlling the width and height of the report in preview.
A report is to be generated based on a form.
I generated the form then created a report.
Report’s design view width= 8.5833" and height = 20.3333”
But when I opened the report, the report page appeared as below.
Can you notice the caseno split into 2 pages.
“Ca” appears in first page and “seno 122” appears in second page.
I didn’t make any change to page setup.
Then I changed the page setup to tabloid 11 x 17
I got report as below. Got the one which we want. But this has 2 drawbacks
1.if we modify the anything in report’s designview it again appears as 2 pages(we have to change page setup again)
2. also Since tabloid 11 x 17 won’t be available in all system.
So I tried to alter the height and width via code.
The code which I implemented didn’t turn out to work well.
Code implementation:
PrtDevmode example present in help. It said “illegal Program operation”
Later I compressed the report in designview to make it appear in one page.
Now the form appears in 2 pages as below.
Papersize: (81/2 x 14)
Can I adjust the height so that the entire form appears in single page.?
[In designview ,it is a single page of height 20.9167” and width 6.6667”]
I need to adjust a report’s height and width (using VBA ? )
without implementing page setup options?
Is this possible?
Please help
Problem in controlling the width and height of the report in preview.
A report is to be generated based on a form.
I generated the form then created a report.
Report’s design view width= 8.5833" and height = 20.3333”
But when I opened the report, the report page appeared as below.
Can you notice the caseno split into 2 pages.
“Ca” appears in first page and “seno 122” appears in second page.
I didn’t make any change to page setup.


Then I changed the page setup to tabloid 11 x 17
I got report as below. Got the one which we want. But this has 2 drawbacks
1.if we modify the anything in report’s designview it again appears as 2 pages(we have to change page setup again)
2. also Since tabloid 11 x 17 won’t be available in all system.

So I tried to alter the height and width via code.
The code which I implemented didn’t turn out to work well.
Code implementation:
PrtDevmode example present in help. It said “illegal Program operation”
Later I compressed the report in designview to make it appear in one page.
Now the form appears in 2 pages as below.
Papersize: (81/2 x 14)

Can I adjust the height so that the entire form appears in single page.?
[In designview ,it is a single page of height 20.9167” and width 6.6667”]
I need to adjust a report’s height and width (using VBA ? )
without implementing page setup options?
Is this possible?
Please help