Moving controls inside a Tab Control

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
 
J

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
 
J

John Spencer

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
 
J

Jay

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top