Moving controls inside a Tab Control

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

On a report detail section, I have a Tab Control. Whenever I change the Top
property of one of the controls on one of it's pages, Detail.Height gets very
large, taking up 3 pages. I am doing this using VBA code in the Report's
Open event. I am opening the report in the Preview View from a form. If I
open the report in the Layout view, then switch to Preview View, the detail
section does not grow. However, I need to open this report in Preview mode.
Any ideas?

Jay
 
I figured out the workaround:

If you use VBA code to change the Top property (and possibly other
properties) of a control that is on a Page of a Tab Control, you will then
have to:

1) Set the Width of the Tab Control back to it's orginal value
2) Set the Height of the Tab Control back to it's original value
3) Set the Height of the Detail section back to it's original value
4) Set the Width of the report back to it's original value.

Otherwise, those four properties are left at very large numbers (in the
20000 - 30000 twips range). It doesn't seem to matter what the settings for
CanGrow, etc. are. I think this qualifies as a bug.

Jay
 
Why would you have a tab control on a report in the first place? I would
never think of using one in a report.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
It is a convenient way to set a bunch of fields visible or not visible. Put
them all on a tab control and set the visible property of the tab control.
Note this is not for a report that has neat columns and rows, but for a
report where each page has a lot of detail on various areas of the page.

Jay
 
Back
Top