Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying the Top Property of Report controls

Status
Not open for further replies.

dfwelch

Programmer
Dec 5, 2003
51
US
I have become quite adept in the past few weeks (thanks to a few folks in this forum!) at moving report controls around on the page based on field values. However, I am stumped as to why this is happening.

When I modify the twips for the Top property of a field, sometimes the control "jumps" much more on the page, usually up, than I intend. For example, I have this one group of controls I want to move up on the page CLOSER to another group of controls. One of the control in the moving group is called Aptitudes.

So, I set Me.Aptitudes.Top = 9250 twips and the control is too low, I need it up another inch or so. But, even if I change Me.Aptitudes.Top = 9200 twips, the darn thing moves 2 inches to be ON TOP OF the control above it! What's up with this?
 
Do you have any controls that are set to Can Grow: Yes? Have you tried to use debugging code in the On Print event like:
Debug.Print Me.Aptitudes.Top

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Yes, I had a feeling it might be happening because of the Can Grow property. I can't change it though, so what other options do I have?

The Aptitudes control is ending up on top of a subreport that can grow. Should I calculate the required height of the text box for that record and manually set it? Would that also be set in twips? And, is there an easy way to determine exactly what the height needs to be for that record?
 
You might be able to retrieve the top and height of the subreport control in the On Print event and then use this to set the Top property of the Aptitudes control. I am not 100% positive on this. I know that you could use the Me.Print to print information on your report in the On Print event but it may be too late to move the control.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top