VBA codes with repeated rows in report

Esmatullaharifi

Registered User.
Local time
Tomorrow, 02:55
Joined
Jul 11, 2014
Messages
27
Hi!
I have used
Code:
If  Len(Result.Value) > 7 then
Result.TopMargin = 0
End If
vba code but it is applying to all rows whenever one of rows located in repeated area of report make condition true. How to solve this issue.
 
I'm not clear on what you're trying to do, but code like that would need to be in the format event of the detail section, and would need an Else clause to set the property when the value wasn't greater than 7.
 
Paul is right, you need an else top margin is six or something to reset the other rows. But I am gonna throw my two cents in as well because I rarely adjust the top margins. Are you aware that text boxes can "grow" if the length is beyond the size of the text box. By setting the Can Grow property to true for the text box and that section of the report, (I'm guessing detail) the box will expand downward to allow all the text to be displayed. It's pretty standard for all my text boxes in the detail section of a report. Hope that helps.
 

Users who are viewing this thread

Back
Top Bottom