0
votes

Is it possible to hide the blank pages generated by setting fields under Non visible function on an Access Report? For exemple, due seleccion 1 made by user ona form then 10 fields are shown in the access report. But when selection 2 is made, only 3 would be visible, but the 7 rest would be "non visible", therefor generate a blank page/space... is it a way to program on VBA to hide this empty space, or to adjust the page to what is "visible"?

I added the suggested .left property in the report code, but the blank area doesn't seems to shrink...

 Me!Cap4.Report!ToolConfDesc.Left = 0
 Me!Cap4.Report!ToolConfDescpiclbl.Left = 0
 Me!Cap4.Report!ToolConfDescpic.Left = 0
 Me!Cap4.Report!ToolConfDescpiclbl.Left = 0

 Me!Cap4.Report!DandFDesc.Left = 0
 Me!Cap4.Report!DandFDesclbl.Left = 0
 Me!Cap4.Report!DandFTable.Left = 0
 Me!Cap4.Report!DandFTablelbl.Left = 0

 Me!Cap4.Report!MoSDesc.Left = 0
 Me!Cap4.Report!MoSDesclbl.Left = 0
 Me!Cap4.Report!MoSDescPic.Left = 0
 Me!Cap4.Report!MoSDescPiclbl.Left = 0
1
Did you also add the Me.Width = ... ? - Andre
no, cos the suggestion said only .left = 0 i must add the .width = 0 property also?? - Pia A
Not 0. Please check the last line of my answer. - Andre
ahh yes i had set both, but i still get the blank space...i have also tried to set can shrink and can grow properties to yes, but does nothing... - Pia A

1 Answers

0
votes

In the event procedure where you set the fields invisible (I assume Report_Open):

  • Set .Left of all invisible fields to 0, so they don't get in the way when reducing the report width
  • Set the report width small enough that no blank pages are generated, e.g.
Me.Width = 17 * 567  ' 17 cm * 567 Twips/cm