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!

Changing Properties of Report Element in OnFormat Event

Status
Not open for further replies.

dfwelch

Programmer
Dec 5, 2003
51
US
Can I change the "Top" property of a text box on a report based on the value of a field on the report?

In other words, will this work?

If True Statement Then
Me.TextBox1.Top = "5"
End If

If I am able to do this, what is the correct syntax for the inch measurement "5" I want to set the Top property to?
 
Top property values are measured in twips. There are approximately 1440 twips to a inch, so try 7200 as the value - (1440 * 5)

Hoc nomen meum verum non est.
 
This place is incredible! LOL, I just found that answer using VB help, but thanks a million for the very quick response!
 
Alright, someone take a shot at this one!
I was able to get this working, but the problem I'm running into is "undoing" the change for subsequent records in the report. What I mean is this.

The affected record is number 23. For the previous 22 records, the vertical position of the label is perfect, as it floats according to the Can Grow properties of fields before it on the page. However, for all the records AFTER 23, the label is not being placed as well. The problem seems to be two-fold; the label is not properly placed with respect to what is BEFORE it on the page, but the text box that is AFTER it is pulled maybe a half-inch up so it's over the label!

Any solution folks? I've tried adding an Else statement to the If Then test, but what should the bnew value of the Top property be? Default does not work, it puts the label at the top of the page for EVERY OTHER record!

Also, where the heck can I learn all this stuff? I can't find most of it in Access VB help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top