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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need to truncate concatenated text in a field

Status
Not open for further replies.

dbar10

Programmer
Dec 5, 2008
196
US
I have two forms on one report. The first one is in the Report header and the second one is an addendum to the first in the detail section. I have concatenated text from multiple records going into a text box that is a single line on my main form. The extra text that won't fit needs to go to another subreport on the addendum. I am using a copy of the subreport on the first form for the addendum. Is there a way to use the OnFormat to limit the text on the Main form (485 Report)and break it on the last comma before it runs out of room and then have the rest appear in the addendum (487Form)?
 
I am working on a different solution than the one described above. Instead, I want the text to print in the text box on the 485Report unless it exceeds the size of the text box. If it does then I want the data to print on the 487 report.
Something like if record is >=100 characters then Display "See Addendum". Otherwise it will display. Then on subreport of Addendum I will have it look at same record and if it is > 100 characters then it will display there. I am not familiar with limiting characters in a text box or writing this kind of command. Can anyone help? Thanks
 
Thanks guys. I figured out a solution that will work using the MyCount:Len([SafetyMeasures])in the sourse query and basing reults in text box from that. It's not exactly what I wanted but it will work.
 
Something like a control source of...

Code:
=IIF(Len([Field])>100,"See Addendum", [Field])

Of course you would have to substitute your field for field.


I hope that helps as I am a little confused on what exactly you are trying to do. If you explained in terms of main report, sub report and respective record sources it would probably help.
 
Yes lameid, that's what I did. thanks
 
I hate cross posting... I wish the forum would notify us when we are composing that there was a recent post. Oh well at least it is free :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top